Flag SYS_FLAG_SHOW_LOGO added to EEPROM_SYS_FLAGS. The boot logo
functions check the flag and bypass the logo sequence if the flag
isn't set.
Added functions writeShowBootLogoFlag() and readShowBootLogoFlag()
for writing and reading the SYS_FLAG_SHOW_LOGO flag.
Renamed example sketch SetNameAndID to SetSystemEEPROM and added
the ability to set the SYS_FLAG_SHOW_LOGO flag, plus menus to reset
the system and user EEPROM areas.
The SpritesB class has functions identical to those in Sprites.
When used in place of Sprites it will usually reduce code size (at the
expense of slower execution speed). Code size reduction is accomplished
by factoring all draw modes into the same loop.
Modifications made to the Sprites class to create this class made by
@dxxb (Delio Brignoli).
Creation of the SpritesB class and documentation by
@MLXXXp (Scott Allen).
Also, bootLogoSpritesBSelfMasked() and bootLogoSpritesBOverwrite()
alternative boot logo functions added by @MLXXXp.
Macro ARDUBOY_NO_USB will provide a substitute main() which will cause
the compiler to leave out the USB code. The macro also adds a check
for the DOWN button being pressed and, if so, will call the new
exitToBootloader() function.
New function exitToBootloader() will invoke the bootloader in command
mode, similar to pressing reset.
- setRGBled() has been rewritten to directly control the hardware
instead of using the Arduino analogWrite() function.
- Added a two parameter version of setRGBled() that sets the brightness
of one LED without affecting the others.
- Added function freeRGBled() for freeing the PWM control of the LEDs
so they can be used digitally.
- Added example sketch RGBled.
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().
Sometimes the compiler would assign r28/29 to one of our input
variables despite our needing to use that register ourselves. This
fix attempts to prevent that from happening and also cleans up a
few other small details.
- remove unnecessary y_count (-1 register)
- set buffer_ofs_2 inside assembly (-1 register)
- require inputs/outputs to use lower or simple upper registers
- declare a high register clobber
This seems to have the side effect of freeing up a high register and
preventing the error:
"can't find a register in class 'LD_REGS' while reloading 'asm'""
When sRow == -1 drawPlusMask can cause buffer underflow if it's
interrupted by an interrupt that changes memory that it's in the middle
of writing. Of course it shouldn't be writing to this memory at all.
This fixes the issue.
- Inlined : 332 -> 358 ops/ms
- Non-inlined : 222 -> 303 ops/ms
Moves most of the pixel offset calculation math into assembly.
Also uses a shift lookup table vs calculting bit shifts on the
CPU (which is slow)
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.