Skip to content

save about 400 bytes with _NAMES and a little cleanup #34

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

Merged
merged 3 commits into from
Jun 2, 2018

Conversation

dhalbert
Copy link
Contributor

@dhalbert dhalbert commented Jun 2, 2018

This shrinks the CPX firmware with frozen LIS3DH by 440 bytes.

  1. Use _NAMES for register names, which don't need to be visible externally.
  2. (tiny improvement) simplify a bit masking operation that was needlessly complex.

I tried a few other things, but they only save a few bytes, like combining multiple assignments to zero into a single assignment, etc. Not worth it for readability.

@tannewt this will allow the latest 3.0 fit in CPX with about 400 bytes to spare.

@dhalbert dhalbert requested a review from kattni June 2, 2018 02:14
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Tested with CPX successfully. Thanks for doing this!

@kattni kattni merged commit c4152a0 into adafruit:master Jun 2, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jun 3, 2018
@dhalbert dhalbert deleted the shrink branch November 21, 2021 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants