Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimisation: set enum types explictly to uint8_t #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jul 29, 2024

  1. optimisation: set enum types explictly to uint8_t

    This commit produces the same savings as the compiler options -fshort-enums. Except by setting the types manually we save also 2 bytes of SRAM.
    
    By default, the enum type is 2 bytes, with we can explictly set it to one byte when applicable to reduce code size.
    
    Almost all the savings from from 'enum Mode' in leds.h.
    
    Change in memory:
    Flash: -116 bytes
    SRAM: -2 bytes
    gudnimg committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    7c59f3d View commit details
    Browse the repository at this point in the history