-
-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Rewrite the Bathroom Epiphanies Frosty Flake matrix and LED handling #8243
Conversation
CI build failure seems unrelated to this change |
It was unrelated. |
|
||
led_set_user(usb_led); | ||
return true; | ||
} | ||
|
||
__attribute__ ((weak)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything from this line onwards can be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to. I kept most of these since they were in the original implementation, but I wasn’t sure if they were only valuable as a “here’s how to write a keyboard” template or had practical use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done- I also pulled the two above which were matrix_{init,scan}_kb and were also present in quantum/
This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API.
…trix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well.
a41a55f
to
cace9e7
Compare
These are not necessary (and all of them already live somewhere in Quantum).
cace9e7
to
6d18380
Compare
FWIW: I maintained the four commits indicated without intermediate "address PR feedback" commits for if you have a rebasing pull request workflow. 😄 Thanks for the review! |
Thanks! |
* 'master' of https://github.com/qmk/qmk_firmware: (37 commits) Update Hungarian keymap and add sendstring LUT (qmk#8220) Remove "ugly hack in usb_main.c" comments (qmk#8296) Update encoder functions for Iris VIA keymap (qmk#8295) Reduce PROGMEM usage for sendstring LUT (qmk#8109) [Docs] Update ISP Flashing guide (qmk#8149) Rewrite the Bathroom Epiphanies Frosty Flake matrix and LED handling (qmk#8243) Add onekey keymap for testing reset to bootloader. (qmk#8288) Get the direction right on the S75 encoder (qmk#8287) Prune out pure software pwm && custom driver && remove wrapping BACKLIGHT_PIN (qmk#8041) Make a fix to savage65 and tmov2 for via (qmk#8286) format code according to conventions [skip ci] Short term fix for conflicting types for 'tfp_printf' (qmk#8157) Fix recent clang-format breaking quantum.c (qmk#8282) format code according to conventions [skip ci] Remove duplicate BRTG case (qmk#8277) Clean up includes for glcdfont headers (qmk#7745) Fix the Breaking Changes doc again [Docs] translated 'feature_tap_dance.md' to japanese. (qmk#8137) PWM DMA based RGB Underglow for STM32 (qmk#7928) Add VIA support to Prime_M. Clean up all files (qmk#8247) ...
…mk#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum).
* upstream/master: (37 commits) Add RGB lighting through one of the free pins (qmk#8294) [Keymap] Adding the 4sStylZ xd75 (qmk#8285) YD60MQ refactor and Configurator layout support (qmk#8313) [Keyboard] Forget to ifdef Super16 led config (qmk#8314) [Keyboard] Switch to RGB Matrix for Super16 (qmk#8305) [Keymap] Keymap Update (qmk#8309) New Keyboard: SiddersKB Majbritt (Pronounced My Brit) (qmk#8260) [Keyboard] VIA Support: Tada68 (qmk#8289) [Keyboard] LFK78 refactor (qmk#7835) [Keymap] new userspace for ibnuda (qmk#8221) [Keymap] Add crd's equinox keymap (qmk#8251) [Keymap] Feature/alfrdmalr/keymap update (qmk#8174) Fix bootloader definition for namecard2x4 (qmk#8301) Update Hungarian keymap and add sendstring LUT (qmk#8220) Remove "ugly hack in usb_main.c" comments (qmk#8296) Update encoder functions for Iris VIA keymap (qmk#8295) Reduce PROGMEM usage for sendstring LUT (qmk#8109) [Docs] Update ISP Flashing guide (qmk#8149) Rewrite the Bathroom Epiphanies Frosty Flake matrix and LED handling (qmk#8243) Add onekey keymap for testing reset to bootloader. (qmk#8288) ...
…mk#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum).
…mk#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum).
…mk#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum).
…mk#8243) * Keyboard: revamp frosty-flake leds This commit transitions bpiphany/frosty_flake to led_update_{kb,user} and rewrites the AVR bit twiddling logic to use the standard QMK GPIO API. * Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix This commit replaces frosty_flake's custom matrix and debounce logic with a "lite" custom matrix. In addition to being somewhat clearer, this allows a consumer of the flake board to choose their own debouncing algorithm. The one closest to the implementation originally in use is sym_g, but this opens us up to supporting eager_pk and eager_pr. The original matrix code was 18 columns for 8 rows, but using a single row read and unpacking the bits into individual columns. To simplify, I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us use a single read directly into the matrix _and_ drop down to a uint8_t instead of a uint32_t for matrix_row_t. Since we're no longer implementing our own debouncing and row unpacking, we save ~400 bytes on the final firmware image. Fully tested against a CM Storm QFR hosting the flake -- this commit message was written using the new matrix code. Firmware Sizes (assuming stock configuration as of 42d6270) Matrix+Debounce Size (bytes) --------------- ------------ original 17740 new + sym_g 17284 new + eager_pr 18106 new + eager_pk 18204 I expect that there are some scanning speed benefits as well. * Keyboard: update frosty_flake's UNUSED_PINS * Keyboard: Remove meaningless weak redefinitions from frosty These are not necessary (and all of them already live somewhere in Quantum).
This pull request comprises three individual commits with their own descriptions, copied below.
dc994e883 - Keyboard: rewrite frosty_flake's matrix reader to be a lite custom matrix
This commit replaces frosty_flake's custom matrix and debounce logic
with a "lite" custom matrix. In addition to being somewhat clearer, this
allows a consumer of the flake board to choose their own debouncing
algorithm. The one closest to the implementation originally in use is
sym_g, but this opens us up to supporting eager_pk and eager_pr.
The original matrix code was 18 columns for 8 rows, but using a single
row read and unpacking the bits into individual columns. To simplify,
I've changed the key layout to be 8C 18R instead of 18C 8R: this lets us
use a single read directly into the matrix and drop down to a uint8_t
instead of a uint32_t for matrix_row_t.
Since we're no longer implementing our own debouncing and row unpacking,
we save ~400 bytes on the final firmware image.
Fully tested against a CM Storm QFR hosting the flake -- this commit
message was written using the new matrix code.
Firmware Sizes (assuming stock configuration as of 42d6270)
I expect that there are some scanning speed benefits as well.
df14844619b - Keyboard: update frosty_flake's UNUSED_PINS
66bb555d - Keyboard: revamp frosty-flake leds
This commit transitions bpiphany/frosty_flake to led_update_{kb,user}
and rewrites the AVR bit twiddling logic to use the standard QMK GPIO
API.
f3428f9be09 - Keyboards: Remove meaningless weak redefinitions from frosty
These are not necessary (and all of them already live somewhere in
Quantum).
Types of Changes
Checklist