diff options
| -rw-r--r-- | layouts/community/ergodox/drashna_glow/rules.mk | 1 | ||||
| -rw-r--r-- | users/drashna/config.h | 2 | ||||
| -rw-r--r-- | users/drashna/drashna.c | 14 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 38 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.h | 2 |
5 files changed, 34 insertions, 23 deletions
diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index e152fa01f..5cb47dae4 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk | |||
| @@ -6,4 +6,5 @@ SRC += ../drashna/keymap.c | |||
| 6 | ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) | 6 | ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) |
| 7 | RGBLIGHT_ENABLE = no | 7 | RGBLIGHT_ENABLE = no |
| 8 | RGB_MATRIX_ENABLE = yes | 8 | RGB_MATRIX_ENABLE = yes |
| 9 | TAP_DANCE_ENABLE = no | ||
| 9 | endif | 10 | endif |
diff --git a/users/drashna/config.h b/users/drashna/config.h index 20e58fd0b..2e125d1e4 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -55,7 +55,7 @@ | |||
| 55 | // and when this option isn't enabled, z rapidly followed by x | 55 | // and when this option isn't enabled, z rapidly followed by x |
| 56 | // actually sends Ctrl-x. That's bad.) | 56 | // actually sends Ctrl-x. That's bad.) |
| 57 | #define IGNORE_MOD_TAP_INTERRUPT | 57 | #define IGNORE_MOD_TAP_INTERRUPT |
| 58 | // #define PERMISSIVE_HOLD | 58 | #undef PERMISSIVE_HOLD |
| 59 | //#define TAPPING_FORCE_HOLD | 59 | //#define TAPPING_FORCE_HOLD |
| 60 | //#define RETRO_TAPPING | 60 | //#define RETRO_TAPPING |
| 61 | 61 | ||
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 222824837..8019f2667 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -122,11 +122,17 @@ void matrix_init_user(void) { | |||
| 122 | get_unicode_input_mode(); | 122 | get_unicode_input_mode(); |
| 123 | #endif //UNICODE_ENABLE | 123 | #endif //UNICODE_ENABLE |
| 124 | matrix_init_keymap(); | 124 | matrix_init_keymap(); |
| 125 | #ifdef RGBLIGHT_ENABLE | ||
| 126 | matrix_init_rgb(); | ||
| 127 | #endif //RGBLIGHT_ENABLE | ||
| 128 | } | 125 | } |
| 129 | 126 | ||
| 127 | __attribute__((weak)) | ||
| 128 | void keyboard_post_init_keymap(void){ } | ||
| 129 | |||
| 130 | void keyboard_post_init_user(void){ | ||
| 131 | #ifdef RGBLIGHT_ENABLE | ||
| 132 | keyboard_post_init_rgb(); | ||
| 133 | #endif | ||
| 134 | keyboard_post_init_keymap(); | ||
| 135 | } | ||
| 130 | 136 | ||
| 131 | __attribute__ ((weak)) | 137 | __attribute__ ((weak)) |
| 132 | void shutdown_keymap(void) {} | 138 | void shutdown_keymap(void) {} |
| @@ -208,9 +214,11 @@ uint32_t default_layer_state_set_keymap (uint32_t state) { | |||
| 208 | // Runs state check and changes underglow color and animation | 214 | // Runs state check and changes underglow color and animation |
| 209 | uint32_t default_layer_state_set_user(uint32_t state) { | 215 | uint32_t default_layer_state_set_user(uint32_t state) { |
| 210 | state = default_layer_state_set_keymap(state); | 216 | state = default_layer_state_set_keymap(state); |
| 217 | #if 0 | ||
| 211 | #ifdef RGBLIGHT_ENABLE | 218 | #ifdef RGBLIGHT_ENABLE |
| 212 | state = default_layer_state_set_rgb(state); | 219 | state = default_layer_state_set_rgb(state); |
| 213 | #endif // RGBLIGHT_ENABLE | 220 | #endif // RGBLIGHT_ENABLE |
| 221 | #endif | ||
| 214 | return state; | 222 | return state; |
| 215 | } | 223 | } |
| 216 | 224 | ||
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 37076ce99..7eaa7e949 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -243,25 +243,25 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 243 | 243 | ||
| 244 | 244 | ||
| 245 | 245 | ||
| 246 | void matrix_init_rgb(void) { | 246 | void keyboard_post_init_rgb(void) { |
| 247 | 247 | ||
| 248 | // #ifdef RGBLIGHT_ENABLE | 248 | #ifdef RGBLIGHT_ENABLE |
| 249 | // if (userspace_config.rgb_layer_change) { | 249 | if (userspace_config.rgb_layer_change) { |
| 250 | // rgblight_enable_noeeprom(); | 250 | rgblight_enable_noeeprom(); |
| 251 | // switch (biton32(eeconfig_read_default_layer())) { | 251 | switch (biton32(eeconfig_read_default_layer())) { |
| 252 | // case _COLEMAK: | 252 | case _COLEMAK: |
| 253 | // rgblight_sethsv_noeeprom_magenta(); break; | 253 | rgblight_sethsv_noeeprom_magenta(); break; |
| 254 | // case _DVORAK: | 254 | case _DVORAK: |
| 255 | // rgblight_sethsv_noeeprom_springgreen(); break; | 255 | rgblight_sethsv_noeeprom_springgreen(); break; |
| 256 | // case _WORKMAN: | 256 | case _WORKMAN: |
| 257 | // rgblight_sethsv_noeeprom_goldenrod(); break; | 257 | rgblight_sethsv_noeeprom_goldenrod(); break; |
| 258 | // default: | 258 | default: |
| 259 | // rgblight_sethsv_noeeprom_cyan(); break; | 259 | rgblight_sethsv_noeeprom_cyan(); break; |
| 260 | // } | 260 | } |
| 261 | // rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); | 261 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 262 | // } | 262 | } |
| 263 | // #endif | 263 | #endif |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | void matrix_scan_rgb(void) { | 266 | void matrix_scan_rgb(void) { |
| 267 | #ifdef RGBLIGHT_TWINKLE | 267 | #ifdef RGBLIGHT_TWINKLE |
| @@ -336,6 +336,7 @@ uint32_t layer_state_set_rgb(uint32_t state) { | |||
| 336 | return state; | 336 | return state; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | #if 0 | ||
| 339 | uint32_t default_layer_state_set_rgb(uint32_t state) { | 340 | uint32_t default_layer_state_set_rgb(uint32_t state) { |
| 340 | #ifdef RGBLIGHT_ENABLE | 341 | #ifdef RGBLIGHT_ENABLE |
| 341 | if (userspace_config.rgb_layer_change) { | 342 | if (userspace_config.rgb_layer_change) { |
| @@ -371,3 +372,4 @@ uint32_t default_layer_state_set_rgb(uint32_t state) { | |||
| 371 | #endif // RGBLIGHT_ENABLE | 372 | #endif // RGBLIGHT_ENABLE |
| 372 | return state; | 373 | return state; |
| 373 | } | 374 | } |
| 375 | #endif | ||
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 065bda9f9..886f20ffc 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -13,7 +13,7 @@ typedef struct { | |||
| 13 | 13 | ||
| 14 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); | 14 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); |
| 15 | void scan_rgblight_fadeout(void); | 15 | void scan_rgblight_fadeout(void); |
| 16 | void matrix_init_rgb(void); | 16 | void keyboard_post_init_rgb(void); |
| 17 | void matrix_scan_rgb(void); | 17 | void matrix_scan_rgb(void); |
| 18 | uint32_t layer_state_set_rgb(uint32_t state); | 18 | uint32_t layer_state_set_rgb(uint32_t state); |
| 19 | uint32_t default_layer_state_set_rgb(uint32_t state); | 19 | uint32_t default_layer_state_set_rgb(uint32_t state); |
