diff --git a/LICENSE.txt b/LICENSE.txt index 843a365..a454e8a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -8,7 +8,7 @@ Software License Agreements Licensed under the BSD 3-clause license: Arduboy2 library: -Copyright (c) 2016-2018, Scott Allen +Copyright (c) 2016-2020, Scott Allen All rights reserved. The Arduboy2 library was forked from the Arduboy library: diff --git a/README.md b/README.md index 7241fd4..22b37be 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ At the start of the sketch, the **ARDUBOY** logo scrolls down from the top of th The RGB LED lights red then green then blue while the logo is scrolling. (If your Arduboy is one of those that has the RGB LED installed incorrectly, then it will light blue then off then red). For users who do not wish to have the RGB LED flash during the boot logo sequence, a flag can be set in system EEPROM to have it remain off. The included *SetSystemEEPROM* example sketch can be used to set this flag. -A user settable *unit name* of up to 6 characters can be saved in system EEPROM memory. If set, this name will be briefly displayed at the bottom of the boot logo screen, after the logo stops scrolling down. This feature is only available if the *Arduboy2* class is used, not the *Arduboy2Base* class. This is because it requires the text display functions, which are only available in the *Arduboy2* class. A flag in system EEPROM controls whether or not the *unit name* is displayed on the boot logo screen, regardless of whether the *unit name* itself has been set. The included *SetSystemEEPROM* example sketch can be used to set both the *unit name* and this flag. +A user settable *unit name* can be saved in system EEPROM memory. If set, this name will be briefly displayed at the bottom of the boot logo screen, after the logo stops scrolling down. This feature is only available if the *Arduboy2* class is used, not the *Arduboy2Base* class. This is because it requires the text display functions, which are only available in the *Arduboy2* class. A flag in system EEPROM controls whether or not the *unit name* is displayed on the boot logo screen, regardless of whether the *unit name* itself has been set. The included *SetSystemEEPROM* example sketch can be used to set both the *unit name* and this flag. Once the logo display sequence completes, the sketch continues. @@ -109,9 +109,9 @@ Sample sketches have been included with the library as examples of how to use it More information on writing sketches for the Arduboy can be found in the [Arduboy Community Forum](http://community.arduboy.com/). -### Using EEPROM in a sketch +### Using EEPROM in a sketch <- THIS IS IMPORTANT! -The Arduboy2 library reserves an area at the start of EEPROM for storing system information, such as the current audio mute state and the Unit Name and Unit ID. A sketch **must not** use this reserved area for its own purposes. A sketch may use any EEPROM past this reserved area. The first EEPROM address available for sketch use is given as the defined value *EEPROM_STORAGE_SPACE_START* +The Arduboy2 library reserves an area at the start of EEPROM for storing system information, such as the current audio mute state and the Unit Name and Unit ID. A sketch **MUST NOT** use this reserved area for its own purposes. A sketch may use any EEPROM past this reserved area. The first EEPROM address available for sketch use is given as the defined value *EEPROM_STORAGE_SPACE_START* ### Audio control functions diff --git a/examples/SetSystemEEPROM/SetSystemEEPROM.ino b/examples/SetSystemEEPROM/SetSystemEEPROM.ino index 3c65371..d8cd489 100644 --- a/examples/SetSystemEEPROM/SetSystemEEPROM.ino +++ b/examples/SetSystemEEPROM/SetSystemEEPROM.ino @@ -298,7 +298,7 @@ void screenSaveName(), screenSaveID(), screenResetSys(), screenResetUser(); Arduboy2 arduboy; -char unitName[ARDUBOY_UNIT_NAME_LEN + 1]; +char unitName[ARDUBOY_UNIT_NAME_BUFFER_SIZE]; byte nameIndex; uint16_t unitID; diff --git a/extras/docs/FILE_DESCRIPTIONS.md b/extras/docs/FILE_DESCRIPTIONS.md index 7ef06dc..a4ee2d8 100644 --- a/extras/docs/FILE_DESCRIPTIONS.md +++ b/extras/docs/FILE_DESCRIPTIONS.md @@ -1,6 +1,6 @@ # File Descriptions -Documentation for files contained in this repository which aren't self explanatory. +Documentation for files contained in this repository that aren't self explanatory. ### /library.properties diff --git a/keywords.txt b/keywords.txt index b5caf94..d17a6cc 100644 --- a/keywords.txt +++ b/keywords.txt @@ -134,6 +134,7 @@ drawSelfMasked KEYWORD2 ARDUBOY_LIB_VER LITERAL1 ARDUBOY_UNIT_NAME_LEN LITERAL1 +ARDUBOY_UNIT_NAME_BUFFER_SIZE LITERAL1 EEPROM_STORAGE_SPACE_START LITERAL1 diff --git a/src/Arduboy2.cpp b/src/Arduboy2.cpp index 7f11d4b..71dce59 100644 --- a/src/Arduboy2.cpp +++ b/src/Arduboy2.cpp @@ -504,13 +504,13 @@ void Arduboy2Base::drawLine // bresenham's algorithm - thx wikpedia bool steep = abs(y1 - y0) > abs(x1 - x0); if (steep) { - swap(x0, y0); - swap(x1, y1); + swapInt16(x0, y0); + swapInt16(x1, y1); } if (x0 > x1) { - swap(x0, x1); - swap(y0, y1); + swapInt16(x0, x1); + swapInt16(y0, y1); } int16_t dx, dy; @@ -719,15 +719,15 @@ void Arduboy2Base::fillTriangle // Sort coordinates by Y order (y2 >= y1 >= y0) if (y0 > y1) { - swap(y0, y1); swap(x0, x1); + swapInt16(y0, y1); swapInt16(x0, x1); } if (y1 > y2) { - swap(y2, y1); swap(x2, x1); + swapInt16(y2, y1); swapInt16(x2, x1); } if (y0 > y1) { - swap(y0, y1); swap(x0, x1); + swapInt16(y0, y1); swapInt16(x0, x1); } if(y0 == y2) @@ -787,7 +787,7 @@ void Arduboy2Base::fillTriangle if(a > b) { - swap(a,b); + swapInt16(a,b); } drawFastHLine(a, y, b-a+1, color); @@ -807,7 +807,7 @@ void Arduboy2Base::fillTriangle if(a > b) { - swap(a,b); + swapInt16(a,b); } drawFastHLine(a, y, b-a+1, color); @@ -879,7 +879,7 @@ void Arduboy2Base::drawSlowXYBitmap // Helper for drawCompressed() -struct BitStreamReader +struct Arduboy2Base::BitStreamReader { const uint8_t *source; uint16_t sourceIndex; @@ -1149,7 +1149,7 @@ void Arduboy2Base::writeShowBootLogoLEDsFlag(bool val) EEPROM.update(EEPROM_SYS_FLAGS, flags); } -void Arduboy2Base::swap(int16_t& a, int16_t& b) +void Arduboy2Base::swapInt16(int16_t& a, int16_t& b) { int16_t temp = a; a = b; diff --git a/src/Arduboy2.h b/src/Arduboy2.h index 790d646..b9e16e4 100644 --- a/src/Arduboy2.h +++ b/src/Arduboy2.h @@ -29,22 +29,47 @@ * \code{.cpp} * // If the library is version 2.1.0 or higher * #if ARDUBOY_LIB_VER >= 20100 - * // ... code that make use of a new feature added to V2.1.0 + * // ... code that makes use of a new feature added to V2.1.0 * #endif * \endcode */ #define ARDUBOY_LIB_VER 50201 // EEPROM settings -#define ARDUBOY_UNIT_NAME_LEN 6 /**< The maximum length of the unit name string. */ +/** \brief + * The maximum number of characters in an unterminated unit name. + * + * \details + * This value represents the maximum number of characters in a unit name + * **NOT including** the necessary null character required to store the + * unit name as a C-style null-terminated string. To specify the size of a + * `char` array large enough to store a null-terminated string holding a + * unit name, please use `ARDUBOY_UNIT_NAME_BUFFER_SIZE` instead. + * + * \see ARDUBOY_UNIT_NAME_BUFFER_SIZE + */ +#define ARDUBOY_UNIT_NAME_LEN 6 + +/** \brief + * The mininum number of characters required to store a + * null-terminated unit name. + * + * \details + * This value should be used to specify the size of a `char` array large enough + * to store a C-style null-terminated string holding a unit name. + * + * \see Arduboy2Base::readUnitName() Arduboy2Base::writeUnitName() + * ARDUBOY_UNIT_NAME_LEN + */ +#define ARDUBOY_UNIT_NAME_BUFFER_SIZE (ARDUBOY_UNIT_NAME_LEN + 1) #define EEPROM_VERSION 0 #define EEPROM_SYS_FLAGS 1 #define EEPROM_AUDIO_ON_OFF 2 #define EEPROM_UNIT_ID 8 // A uint16_t binary unit ID -#define EEPROM_UNIT_NAME 10 // An up to 6 character unit name. Cannot contain - // 0x00 or 0xFF. Lengths less than 6 are padded - // with 0x00 +#define EEPROM_UNIT_NAME 10 // An up to 6 character unit name + // Cannot contain 0x00, 0xFF, 0x0A, 0x0D + // Lengths less than 6 are padded with 0x00 // EEPROM_SYS_FLAGS values #define SYS_FLAG_UNAME 0 // Display the unit name on the logo screen @@ -506,10 +531,6 @@ class Arduboy2Base : public Arduboy2Core */ void drawCircle(int16_t x0, int16_t y0, uint8_t r, uint8_t color = WHITE); - // Draw one or more "corners" of a circle. - // (Not officially part of the API) - void drawCircleHelper(int16_t x0, int16_t y0, uint8_t r, uint8_t corners, uint8_t color = WHITE); - /** \brief * Draw a filled-in circle of a given radius. * @@ -520,11 +541,6 @@ class Arduboy2Base : public Arduboy2Core */ void fillCircle(int16_t x0, int16_t y0, uint8_t r, uint8_t color = WHITE); - // Draw one or both vertical halves of a filled-in circle or - // rounded rectangle edge. - // (Not officially part of the API) - void fillCircleHelper(int16_t x0, int16_t y0, uint8_t r, uint8_t sides, int16_t delta, uint8_t color = WHITE); - /** \brief * Draw a line between two specified points. * @@ -768,9 +784,6 @@ class Arduboy2Base : public Arduboy2Core */ void initRandomSeed(); - // Swap the values of two int16_t variables passed by reference. - void swap(int16_t& a, int16_t& b); - /** \brief * Set the frame rate used by the frame control functions. * @@ -935,7 +948,7 @@ class Arduboy2Base : public Arduboy2Core * Read the state of the buttons and return `true` if all the buttons in the * specified mask are being pressed. * - * Example: `if (pressed(LEFT_BUTTON + A_BUTTON))` + * Example: `if (pressed(LEFT_BUTTON | A_BUTTON))` * * \note * This function does not perform any button debouncing. @@ -1111,16 +1124,24 @@ class Arduboy2Base : public Arduboy2Core /** \brief * Read the unit name from system EEPROM. * - * \param name A pointer to a string array variable where the unit name will - * be placed. The string will be up to 6 characters and terminated with a - * null (0x00) character, so the provided array must be at least 7 bytes long. + * \param name A pointer to the first element of a `char` array in which the + * unit name will be written. The name will be up to `ARDUBOY_UNIT_NAME_LEN` + * characters in length and additionally terminated with a null (0x00) + * character, so **the provided array MUST be at least + * `ARDUBOY_UNIT_NAME_BUFFER_SIZE` characters long**. + * Using `ARDUBOY_UNIT_NAME_BUFFER_SIZE` to specify the array length is the + * proper way to do this, although any array larger than + * `ARDUBOY_UNIT_NAME_BUFFER_SIZE` is also acceptable. * - * \return The length of the string (0-6). + * \return The length of the string (between 0 and + * `ARDUBOY_UNIT_NAME_LEN` *inclusive*). * * \details - * This function reads the unit name that has been set in system EEPROM. The - * name is in ASCII and can contain any values except 0xFF and the - * null (0x00) terminator value. + * This function reads the unit name that has been set in system EEPROM. + * The name represents characters in the library's `font5x7` font. It can + * contain any values except 0xFF and the null (0x00) terminator value, plus + * the ASCII newline/line feed character (`\n`, 0x0A, inverse white circle) + * and ASCII carriage return character (`\r`, 0x0D, musical eighth note). * * The name can be used for any purpose. It could identify the owner or * give the unit itself a nickname. A sketch could use it to automatically @@ -1128,35 +1149,39 @@ class Arduboy2Base : public Arduboy2Core * "player" when the opponent is the computer. * * \note - * Sketches can use the defined value `ARDUBOY_UNIT_NAME_LEN` instead of - * hard coding a 6 when working with the unit name. For example, to allocate - * a buffer and read the unit name into it: + * The defined value `ARDUBOY_UNIT_NAME_BUFFER_SIZE` should be used to + * allocate an array to hold the unit name string, instead of using a + * hard coded value for the size. + * For example, to allocate a buffer and read the unit name into it: * \code{.cpp} - * // Buffer for maximum name length plus the terminator - * char unitName[ARDUBOY_UNIT_NAME_LEN + 1]; + * // Buffer large enough to hold the unit name and a null terminator + * char unitName[ARDUBOY_UNIT_NAME_BUFFER_SIZE]; * - * // The actual name length - * byte unitNameLength; - * - * unitNameLength = arduboy.readUnitName(unitName); + * // After the call, unitNameLength will contain the actual name length, + * // not including the null terminator. + * uint8_t unitNameLength = arduboy.readUnitName(unitName); * \endcode * * \see writeUnitName() readUnitID() Arduboy2::bootLogoExtra() + * ARDUBOY_UNIT_NAME_BUFFER_SIZE ARDUBOY_UNIT_NAME_LEN Arduboy2::font5x7 */ uint8_t readUnitName(char* name); /** \brief * Write a unit name to system EEPROM. * - * \param name A pointer to a string array variable containing the unit name - * to be saved. The string can be up to 6 characters and must be terminated - * with a null (0x00) character. It can contain any values except 0xFF. + * \param name A pointer to the first element of a C-style null-terminated + * string containing the unit name to be saved. The name can be up to + * `ARDUBOY_UNIT_NAME_LEN` characters long and must be terminated with a + * null (0x00) character. * * \details * This function writes a unit name to a reserved area in system EEPROM. - * The name is in ASCII and can contain any values except 0xFF and the - * null (0x00) terminator value. The newline character (LF, \\n, 0x0A) and - * carriage return character (CR, \\r, 0x0D) should also be avoided. + * The name represents characters in the library's `font5x7` font. It can + * contain any values except 0xFF and the null (0x00) terminator value, plus + * the ASCII newline/line feed character (`\n`, 0x0A, inverse white circle) + * and ASCII carriage return character (`\r`, 0x0D, musical eighth note) + * because of their special use by the library's text handling functions. * * The name can be used for any purpose. It could identify the owner or * give the unit itself a nickname. A sketch could use it to automatically @@ -1164,10 +1189,12 @@ class Arduboy2Base : public Arduboy2Core * "player" when the opponent is the computer. * * \note - * Sketches can use the defined value `ARDUBOY_UNIT_NAME_LEN` instead of - * hard coding a 6 when working with the unit name. + * The defined value `ARDUBOY_UNIT_NAME_BUFFER_SIZE` should be used to + * allocate an array to hold the unit name string, instead of using a + * hard coded value for the size. * * \see readUnitName() writeUnitID() Arduboy2::bootLogoExtra() + * ARDUBOY_UNIT_NAME_BUFFER_SIZE ARDUBOY_UNIT_NAME_LEN Arduboy2::font5x7 */ void writeUnitName(char* name); @@ -1350,11 +1377,26 @@ class Arduboy2Base : public Arduboy2Core static void drawLogoSpritesBSelfMasked(int16_t y); static void drawLogoSpritesBOverwrite(int16_t y); + // draw one or more "corners" of a circle + void drawCircleHelper(int16_t x0, int16_t y0, uint8_t r, uint8_t corners, + uint8_t color = WHITE); + + // draw one or both vertical halves of a filled-in circle or + // rounded rectangle edge + void fillCircleHelper(int16_t x0, int16_t y0, uint8_t r, + uint8_t sides, int16_t delta, uint8_t color = WHITE); + + // helper for drawCompressed() + struct BitStreamReader; + + // swap the values of two int16_t variables passed by reference + void swapInt16(int16_t& a, int16_t& b); + // For button handling uint8_t currentButtonState; uint8_t previousButtonState; - // For frame funcions + // For frame functions uint8_t eachFrameMillis; uint8_t thisFrameStart; bool justRendered; @@ -1401,7 +1443,15 @@ class Arduboy2 : public Print, public Arduboy2Base * as the Arduino `Serial.print()`, etc., functions. * * Print will use the `write()` function to actually draw each character - * in the screen buffer. + * in the screen buffer, using the library's `font5x7` font. + * Two character values are handled specially (and thus the font symbols that + * they represent can't be displayed): + * + * - ASCII newline or line feed (`\n`, 0x0A, inverse white circle). + * This will move the text cursor position to the start of the next line, + * based on the current text size. + * - ASCII carriage return (`\r`, 0x0D, musical eighth note). + * This character will be ignored. * * See: * https://www.arduino.cc/en/Serial/Print @@ -1412,12 +1462,13 @@ class Arduboy2 : public Print, public Arduboy2Base * * arduboy.println("Hello World"); // Prints "Hello World" and then moves the * // text cursor to the start of the next line - * arduboy.print(value); // Prints "42" - * arduboy.print('\n'); // Moves the text cursor to the start of the next line - * arduboy.print(78, HEX) // Prints "4E" (78 in hexadecimal) + * arduboy.print(value); // Prints "42" + * arduboy.print('\n'); // Moves the text cursor to the start of the next line + * arduboy.print(78, HEX); // Prints "4E" (78 in hexadecimal) + * arduboy.print("\x03\xEA"); // Prints a heart symbol and a Greek uppercase omega * \endcode * - * \see Arduboy2::write() + * \see Arduboy2::write() Arduboy2::font5x7 */ using Print::write; @@ -1475,50 +1526,55 @@ class Arduboy2 : public Print, public Arduboy2Base virtual void bootLogoExtra(); /** \brief - * Write a single ASCII character at the current text cursor location. + * Write a single character at the current text cursor position. * - * \param c The ASCII value of the character to be written. + * \param c The value of the character to be written. * * \return The number of characters written (will always be 1). * * \details * This is the Arduboy implemetation of the Arduino virtual `write()` - * function. The single ASCII character specified is written to the - * the screen buffer at the current text cursor. The text cursor is then + * function. The single character specified is written to the the screen + * buffer at the current text cursor position. The text cursor is then * moved to the next character position in the screen buffer. This new cursor * position will depend on the current text size and possibly the current * wrap mode. * - * Two special characters are handled: + * Characters are rendered using the library's `font5x7` font. + * Two character values are handled specially (and thus the font symbols that + * they represent can't be displayed): * - * - The newline character `\n`. This will move the text cursor to the start - * of the next line based on the current text size. - * - The carriage return character `\r`. This character will be ignored. + * - ASCII newline or line feed (`\n`, 0x0A, inverse white circle). + * This will move the text cursor position to the start of the next line, + * based on the current text size. + * - ASCII carriage return (`\r`, 0x0D, musical eighth note). + * This character will be ignored. * * \note * This function is rather low level and, although it's available as a public * function, it wouldn't normally be used. In most cases the Arduino Print * class should be used for writing text. * - * \see Print setTextSize() setTextWrap() + * \see Print setTextSize() setTextWrap() drawChar() */ virtual size_t write(uint8_t); /** \brief - * Draw a single ASCII character at the specified location in the screen + * Draw a single character at the specified location in the screen * buffer. * * \param x The X coordinate, in pixels, for where to draw the character. * \param y The Y coordinate, in pixels, for where to draw the character. - * \param c The ASCII value of the character to be drawn. + * \param c The value of the character to be drawn. * \param color the forground color of the character. * \param bg the background color of the character. * \param size The size of the character to draw. * * \details - * The specified ASCII character is drawn starting at the provided + * The specified character is drawn starting at the provided * coordinate. The point specified by the X and Y coordinates will be the - * top left corner of the character. + * top left corner of the character. The character will be rendered using the + * library's `font5x7` font. * * \note * This is a low level function used by the `write()` function to draw a @@ -1542,8 +1598,8 @@ class Arduboy2 : public Print, public Arduboy2Base * The coordinates are in pixels. Since the coordinates can specify any pixel * location, the text does not have to be placed on specific rows. * As with all drawing functions, location 0, 0 is the top left corner of - * the display. The cursor location will be the top left corner of the next - * character written. + * the display. The cursor location represents the top left corner of the + * next character written. * * \see getCursorX() getCursorY() */ @@ -1648,7 +1704,7 @@ class Arduboy2 : public Print, public Arduboy2Base * cursor will be moved to the start of the next line (based on the current * text size) if the following character wouldn't fit entirely at the end of * the current line. - + * * If wrap mode is disabled, characters will continue to be written to the * same line. A character at the right edge of the screen may only be * partially displayed and additional characters will be off screen. @@ -1682,17 +1738,34 @@ class Arduboy2 : public Print, public Arduboy2Base * size 1 will occupy a 6 x 8 pixel area when drawn. * * The character set represented is code page 437, also known as OEM 437, - * OEM-US, PC-8 or DOS Latin US. + * OEM-US, PC-8 or DOS Latin US. This is an 8 bit set which includes all + * printable ASCII characters plus many accented characters, symbols and + * line drawing characters. * * The data for this font is from file `glcdfont.c` in the * [Adafruit GFX graphics library](https://github.com/adafruit/Adafruit-GFX-Library). * * \note - * Because of the extra blank pixel added to the right of each character, - * the line drawing characters in the font won't touch on the left and right - * sides, as originally intended. + * \parblock + * With the library's text functions, the line drawing characters in the font + * won't touch on the left and right sides, as originally intended, because + * of the extra blank pixel added to the right of each character. + * \endparblock * - * \see drawChar() + * \note + * \parblock + * The library's text functions, except `drawChar()`, handle two character + * values specially (and thus the font symbols that they represent can't be + * displayed using these functions): + * + * - ASCII newline or line feed (`\n`, 0x0A, inverse white circle). + * This will move the text cursor position to the start of the next line, + * based on the current text size. + * - ASCII carriage return (`\r`, 0x0D, musical eighth note). + * This character will be ignored. + * \endparblock + * + * \see Print write() readUnitName() writeUnitName() */ static const PROGMEM uint8_t font5x7[]; diff --git a/src/Arduboy2Core.cpp b/src/Arduboy2Core.cpp index 98bf257..7ccbaae 100644 --- a/src/Arduboy2Core.cpp +++ b/src/Arduboy2Core.cpp @@ -8,7 +8,7 @@ #include -const uint8_t PROGMEM lcdBootProgram[] = { +const PROGMEM uint8_t lcdBootProgram[] = { // boot defaults are commented out but left here in case they // might prove useful for reference // @@ -238,7 +238,7 @@ void Arduboy2Core::SPItransfer(uint8_t data) SPDR = data; /* * The following NOP introduces a small delay that can prevent the wait - * loop form iterating when running at the maximum speed. This gives + * loop from iterating when running at the maximum speed. This gives * about 10% more speed, even if it seems counter-intuitive. At lower * speeds it is unnoticed. */ diff --git a/src/Arduboy2Core.h b/src/Arduboy2Core.h index 5ad797c..13cc73d 100644 --- a/src/Arduboy2Core.h +++ b/src/Arduboy2Core.h @@ -134,12 +134,6 @@ #define RST_PORT PORTD // Display reset port #define RST_BIT PORTD6 // Display reset physical bit number -#define SPI_MOSI_PORT PORTB -#define SPI_MOSI_BIT PORTB2 - -#define SPI_SCK_PORT PORTB -#define SPI_SCK_BIT PORTB1 - // map all LEDs to the single TX LED on DEVKIT #define RED_LED 17 #define GREEN_LED 17 @@ -715,16 +709,16 @@ class Arduboy2Core * * The colors are as follows: * - * RED LED GREEN_LED BLUE_LED COLOR - * ------- --------- -------- ----- - * RGB_OFF RGB_OFF RGB_OFF OFF - * RGB_OFF RGB_OFF RGB_ON Blue - * RGB_OFF RGB_ON RGB_OFF Green - * RGB_OFF RGB_ON RGB_ON Cyan - * RGB_ON RGB_OFF RGB_OFF Red - * RGB_ON RGB_OFF RGB_ON Magenta - * RGB_ON RGB_ON RGB_OFF Yellow - * RGB_ON RGB_ON RGB_ON White + * | RED LED | GREEN LED | BLUE LED | COLOR | + * | ------- | --------- | -------- | :-----: | + * | RGB_OFF | RGB_OFF | RGB_OFF | OFF | + * | RGB_OFF | RGB_OFF | RGB_ON | Blue | + * | RGB_OFF | RGB_ON | RGB_OFF | Green | + * | RGB_OFF | RGB_ON | RGB_ON | Cyan | + * | RGB_ON | RGB_OFF | RGB_OFF | Red | + * | RGB_ON | RGB_OFF | RGB_ON | Magenta | + * | RGB_ON | RGB_ON | RGB_OFF | Yellow | + * | RGB_ON | RGB_ON | RGB_ON | White | * * \note * \parblock diff --git a/src/Arduboy2Data.cpp b/src/Arduboy2Data.cpp index 34bbcc1..c264eab 100644 --- a/src/Arduboy2Data.cpp +++ b/src/Arduboy2Data.cpp @@ -78,7 +78,7 @@ const PROGMEM uint8_t Arduboy2Base::arduboy_logo_sprite[] = { 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00 }; -// Standard ASCII 5x7 font +// ASCII based 5x7 font // IBM PC code page 437 const PROGMEM uint8_t Arduboy2::font5x7[] = { 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/src/SpritesCommon.h b/src/SpritesCommon.h index ffa7938..c7d3b7a 100644 --- a/src/SpritesCommon.h +++ b/src/SpritesCommon.h @@ -1,7 +1,7 @@ /** * @file SpritesCommon.h * \brief - * Common header file for sprite functions + * Common header file for sprite functions. */ #ifndef SpritesCommon_h