qmk_firmware/quantum/keymap_extras
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
..
keymap_belgian.h
keymap_bepo.h
keymap_br_abnt2.h
keymap_canadian_multilingual.h
keymap_colemak.h
keymap_danish.h Add Danish keymap and sendstring LUT (#8218) 2020-02-21 14:40:28 +01:00
keymap_dvorak.h
keymap_dvp.h
keymap_fr_ch.h
keymap_french_osx.h
keymap_french.h
keymap_german_ch.h
keymap_german_osx.h
keymap_german.h
keymap_hungarian.h clang-format changes 2019-08-30 15:01:52 -07:00
keymap_italian_osx_ansi.h Run clang-format manually to fix recently changed files 2019-11-17 08:25:58 -08:00
keymap_italian_osx_iso.h Run clang-format manually to fix recently changed files 2019-11-17 08:25:58 -08:00
keymap_italian.h Run clang-format manually to fix recently changed files 2019-11-17 08:25:58 -08:00
keymap_jp.h
keymap_neo2.h
keymap_nordic.h
keymap_norman.h
keymap_norwegian.h
keymap_plover_dvorak.h
keymap_plover.h
keymap_slovenian.h
keymap_spanish.h
keymap_steno.h
keymap_swedish.h
keymap_turkish_f.h Add Turkish keymap aliases and sendstring LUT (#7676) 2020-02-21 18:21:38 +11:00
keymap_turkish_q.h Add Turkish keymap aliases and sendstring LUT (#7676) 2020-02-21 18:21:38 +11:00
keymap_uk.h
keymap_workman.h
sendstring_belgian.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_bepo.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_colemak.h Fix formatting for sendstring LUTs (#7176) 2019-10-28 15:54:05 -07:00
sendstring_danish.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_dvorak.h Fix formatting for sendstring LUTs (#7176) 2019-10-28 15:54:05 -07:00
sendstring_french.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_german.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_jis.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_norman.h Fix formatting for sendstring LUTs (#7176) 2019-10-28 15:54:05 -07:00
sendstring_spanish.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_turkish_f.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_turkish_q.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_uk.h Reduce PROGMEM usage for sendstring LUT (#8109) 2020-03-03 10:43:18 +11:00
sendstring_workman.h Fix formatting for sendstring LUTs (#7176) 2019-10-28 15:54:05 -07:00