diff options
author | Drashna Jaelre <drashna@live.com> | 2019-05-19 10:01:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 10:01:16 -0700 |
commit | 6b8be985551efc5a5f95dfea6dc1554352bc46e0 (patch) | |
tree | cb0db9437ef27eef7c07a26f985a615d17a4d794 /layouts/community/ortho_4x12 | |
parent | 2a8fd5823244eb1c7e8906b4118f01d2078c4e28 (diff) | |
parent | 89e9785d7a87e8dbb941dd272c032f34658169fd (diff) | |
download | firmware-6b8be985551efc5a5f95dfea6dc1554352bc46e0.tar.gz firmware-6b8be985551efc5a5f95dfea6dc1554352bc46e0.tar.bz2 firmware-6b8be985551efc5a5f95dfea6dc1554352bc46e0.zip |
[Keymap] Drashna Corne Keyboard updates (#5903)
* Re-enable Audio
And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes!
* Re-add debounce to ergodox EZ
* Fix rgb matrix helper function
* Make sure that RGM Matrix is checked properly
* Fix merge commit?
* Disable more RGB matrix modes
* Increase Debounce for Ergodox EZ
The performance improvements have made it necessary, actually
* Consolidate RGB Matrix layer indication function
And changes to iris
* Fix lighting issue for gamepad
* Update Corne Keyboard configuration
* Update Corne Keyboard layout
* Update KC_MAKE macro to better handle crkbd split
* Tweaks to Corne Keyboard Layout
* Enable RGB Matrix Sleep
* Update my code to use layer_state_t typedef
Diffstat (limited to 'layouts/community/ortho_4x12')
-rw-r--r-- | layouts/community/ortho_4x12/drashna/keymap.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 9b0c2d794..c1c016ce9 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -180,14 +180,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - void rgb_matrix_indicators_user(void) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); @@ -209,29 +201,29 @@ void rgb_matrix_indicators_user(void) { ) { switch (biton32(layer_state)) { case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; default: switch (biton32(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; } } } @@ -327,7 +319,7 @@ void dip_update(uint8_t index, bool active) { #endif // KEYBOARD_planck_rev6 #ifdef KEYBOARD_planck_ez -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { palClearPad(GPIOB, 8); palClearPad(GPIOB, 9); |