diff options
author | Ted M Lin <tedmlin@gmail.com> | 2020-03-02 18:43:18 -0500 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2020-03-24 16:04:05 +0900 |
commit | 6f1f085b2d66c9984a6a929bb3e673c97c0d5d4d (patch) | |
tree | c222f576b6503b660532236b05cf03f4f66d2f2a /quantum/rgb_matrix_drivers.c | |
parent | 4771cc9f63be9256e7c6d592c107e7943fc9d02f (diff) |
Reduce PROGMEM usage for sendstring LUT (#8109)
* Reduce PROGMEM usage for keycode map
Bit-pack the keycode bool array to gain back a small amount of flash space.
The trade-off is an increase in runtime instructions when running macros.
It does make the code a bit harder to read, as well as maintain.
For configs that use send_string() et al, it saves ~100 bytes.
* Switch to macro and common definition
Rewrite the array declarations so both the unpacked (original) and
packed LUT arrays can use the same value definitions. This is done by
defining a macro that "knows what to do".
This makes the code much easier to read and maintain.
* Fix macro typos and improve perf
Pack the bits in a more efficient order for extraction.
And also fix the copy/paste error in the macro...
* Switch fully to packed LUT
Some minor reformatting.
Compile tested all sendstring_xyz.h to make sure they were converted
properly. Also checked that an unconverted version would generate a
compile error.
* Apply whitespace suggestions from code review
Co-Authored-By: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'quantum/rgb_matrix_drivers.c')
0 files changed, 0 insertions, 0 deletions