New function waitNoButtons() replaces the code at the end of begin()
that waits for all buttons to be released. This is to make it easier
to add back this functionality when using boot() in place of begin().
Same as Arduino delay() except takes a 16 bit value.
Mainly added to save some code in the library but can be used by
sketches for the same purpose.
Also changed a delay in bootLogoText() to match a previous change in
bootLogo()
displayOff() puts the display in low power mode.
displayOn() re-initializes the display after displayOff() is used.
The SPI initialization code was separated from the display
initialization code to facilitate the new functions.
New functions bootLogoCompressed(), bootLogoSpritesSelfMasked() and
bootLogoSpritesOverwrite() can be used in place of bootLogo() to
reduce code size in cases where their drawing functions are shared
with the same functions used by the sketch.
New function bootLogoShell() added to provide common code for the
above functions.
Also, the Sprites class functions, and functions used for drawing the
logos, were made static.
- Added a flag in system EEPROM to indicate if the unit name
should be displayed at the end of the boot logo sequence.
Function bootLogoExtra() displays the unit name only if the
flag is set.
- Added functions writeShowUnitNameFlag() and readShowUnitNameFlag()
to write and read the "Show Unit Name" flag in EEPROM.
- Enhanced the SetNameAndID example sketch to allow setting the
"Show Unit Name" flag in EEPROM.
- Timer 0 is disabled in flashlight() and safeMode() in case its
variables overlap the bootloader "magic key" location.
- Flashlight mode never exits if invoked.
- Made safeMode() public for use as a smaller code size alternative
to flashlight().
This eliminates calls to pinMode(), digitalWrite(), functions to
initialize hardware, etc.
New 2 parameter version of digitalWriteRGB() added, which sets an
individual RGB LED on or off digitally.
New function SPItransfer() added to replace Arduino SPI.transfer().
Also:
- Changes to show the unit name on the boot logo screen
- Added new example sketch SetNameAndID to allow setting the name and ID
- Updated the LICENSE.txt file and made changes to include it in the
Doxygen generated documentation
The Sprites class has been given direct access to the screen buffer so it
doesn't need a pointer to been given to it.
Also updated README.md and keywords.txt, and made minor indent changes in
the .h files.