qmk_firmware/quantum
Ted M Lin 552f8d81b9
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>
2020-03-03 10:43:18 +11:00
..
api
audio 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
backlight Prune out pure software pwm && custom driver && remove wrapping BACKLIGHT_PIN (#8041) 2020-03-01 20:22:13 +00:00
debounce
keymap_extras Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
process_keycode 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
rgb_matrix_animations
rgb_matrix_runners
serial_link 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
split_common Split - Avoid race condition during matrix_init_quantum (#8235) 2020-02-25 14:10:04 +00:00
stm32 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
template
tools
visualizer 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
api.c
api.h
color.c Run clang-format manually to fix recently changed files (#7934) 2020-01-19 16:30:34 +00:00
color.h
config_common.h Ensure setPinInput actually sets input high-Z (#6237) 2020-01-26 23:04:38 -05:00
debounce.h
dip_switch.c
dip_switch.h
dynamic_keymap.c dynamic keymap sanity check (#8181) 2020-02-17 17:54:13 -08:00
dynamic_keymap.h
dynamic_macro.h
encoder.c 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
encoder.h
fauxclicky.c
fauxclicky.h
keycode_config.c
keycode_config.h
keymap.h
keymap_common.c 2020 February 29 Breaking Changes Update (#8064) 2020-02-29 11:59:30 -08:00
led_matrix.c
led_matrix_drivers.c
led_tables.c
led_tables.h
ledmatrix.h
matrix.c Allow 30us matrix delay to be keyboard/user overridable (#8216) 2020-02-21 14:49:33 +11:00
matrix_common.c Allow 30us matrix delay to be keyboard/user overridable (#8216) 2020-02-21 14:49:33 +11:00
mcu_selection.mk Add Arm Teensys to mcu_selection.mk (#8026) 2020-02-21 17:12:15 +11:00
pincontrol.h
pointing_device.c
pointing_device.h
quantum.c Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
quantum.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
quantum_keycodes.h Run clang-format manually to fix recently changed files (#7934) 2020-01-19 16:30:34 +00:00
rgb.h
rgb_matrix.c Run clang-format manually to fix recently changed files (#7934) 2020-01-19 16:30:34 +00:00
rgb_matrix.h
rgb_matrix_drivers.c
rgb_matrix_types.h
rgblight.c Add customisable EEPROM driver selection (#7274) 2020-01-24 12:45:58 +11:00
rgblight.h format code according to conventions [skip ci] 2020-01-20 18:48:28 +00:00
rgblight_breathe_table.h
rgblight_list.h
rgblight_modes.h
rgblight_post_config.h
rgblight_reconfig.h
send_string_keycodes.h Add support for delays in send_string. (#8244) 2020-02-27 20:38:19 +11:00
variable_trace.c
variable_trace.h
velocikey.c
velocikey.h
via.c Add VIA support for QMK backlight, QMK RGBLight (#7911) 2020-01-20 10:18:25 -08:00
via.h Add VIA support for QMK backlight, QMK RGBLight (#7911) 2020-01-20 10:18:25 -08:00