Open gudnimg opened 1 month ago
This commit produces the same savings as the compiler option -fshort-enums. Except by setting the types manually we save also 2 bytes of SRAM.
-fshort-enums
By default, the enum type is 2 bytes, we can explicitly set it to one byte when applicable to reduce code size.
enum
Almost all the savings come from enum Mode in leds.h.
enum Mode
Change in memory: Flash: -116 bytes SRAM: -2 bytes
All values in bytes. Δ Delta to base
This commit produces the same savings as the compiler option
-fshort-enums
. Except by setting the types manually we save also 2 bytes of SRAM.By default, the
enum
type is 2 bytes, we can explicitly set it to one byte when applicable to reduce code size.Almost all the savings come from
enum Mode
in leds.h.Change in memory: Flash: -116 bytes SRAM: -2 bytes