diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-05-17 15:21:45 -0700 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-05-17 15:21:45 -0700 |
| commit | 89e9785d7a87e8dbb941dd272c032f34658169fd (patch) | |
| tree | 75bb6eb561b9188aa031e0c4aee3de46afde45f7 /users/drashna | |
| parent | 356521864e9f49d50131f4779ff9e56dc8b12e8f (diff) | |
| download | qmk_firmware-89e9785d7a87e8dbb941dd272c032f34658169fd.tar.gz qmk_firmware-89e9785d7a87e8dbb941dd272c032f34658169fd.zip | |
Update my code to use layer_state_t typedef
Diffstat (limited to 'users/drashna')
| -rw-r--r-- | users/drashna/drashna.c | 8 | ||||
| -rw-r--r-- | users/drashna/drashna.h | 4 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.c | 2 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.h | 4 | ||||
| -rw-r--r-- | users/drashna/template.c | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 7c60a2e4a..acc6b9f9e 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -187,13 +187,13 @@ void matrix_scan_user(void) { | |||
| 187 | 187 | ||
| 188 | 188 | ||
| 189 | __attribute__ ((weak)) | 189 | __attribute__ ((weak)) |
| 190 | uint32_t layer_state_set_keymap (uint32_t state) { | 190 | layer_state_t layer_state_set_keymap (layer_state_t state) { |
| 191 | return state; | 191 | return state; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | // on layer change, no matter where the change was initiated | 194 | // on layer change, no matter where the change was initiated |
| 195 | // Then runs keymap's layer change check | 195 | // Then runs keymap's layer change check |
| 196 | uint32_t layer_state_set_user(uint32_t state) { | 196 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 197 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 197 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 198 | #ifdef RGBLIGHT_ENABLE | 198 | #ifdef RGBLIGHT_ENABLE |
| 199 | state = layer_state_set_rgb(state); | 199 | state = layer_state_set_rgb(state); |
| @@ -203,12 +203,12 @@ uint32_t layer_state_set_user(uint32_t state) { | |||
| 203 | 203 | ||
| 204 | 204 | ||
| 205 | __attribute__ ((weak)) | 205 | __attribute__ ((weak)) |
| 206 | uint32_t default_layer_state_set_keymap (uint32_t state) { | 206 | layer_state_t default_layer_state_set_keymap (layer_state_t state) { |
| 207 | return state; | 207 | return state; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | // Runs state check and changes underglow color and animation | 210 | // Runs state check and changes underglow color and animation |
| 211 | uint32_t default_layer_state_set_user(uint32_t state) { | 211 | layer_state_t default_layer_state_set_user(layer_state_t state) { |
| 212 | state = default_layer_state_set_keymap(state); | 212 | state = default_layer_state_set_keymap(state); |
| 213 | #if 0 | 213 | #if 0 |
| 214 | #ifdef RGBLIGHT_ENABLE | 214 | #ifdef RGBLIGHT_ENABLE |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 5df67792a..507504f04 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -67,8 +67,8 @@ void shutdown_keymap(void); | |||
| 67 | void suspend_power_down_keymap(void); | 67 | void suspend_power_down_keymap(void); |
| 68 | void suspend_wakeup_init_keymap(void); | 68 | void suspend_wakeup_init_keymap(void); |
| 69 | void matrix_scan_keymap(void); | 69 | void matrix_scan_keymap(void); |
| 70 | uint32_t layer_state_set_keymap (uint32_t state); | 70 | layer_state_t layer_state_set_keymap (layer_state_t state); |
| 71 | uint32_t default_layer_state_set_keymap (uint32_t state); | 71 | layer_state_t default_layer_state_set_keymap (layer_state_t state); |
| 72 | void led_set_keymap(uint8_t usb_led); | 72 | void led_set_keymap(uint8_t usb_led); |
| 73 | void eeconfig_init_keymap(void); | 73 | void eeconfig_init_keymap(void); |
| 74 | 74 | ||
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 342186617..7d364fa68 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -275,7 +275,7 @@ void matrix_scan_rgb(void) { | |||
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | 277 | ||
| 278 | uint32_t layer_state_set_rgb(uint32_t state) { | 278 | layer_state_t layer_state_set_rgb(layer_state_t state) { |
| 279 | #ifdef RGBLIGHT_ENABLE | 279 | #ifdef RGBLIGHT_ENABLE |
| 280 | if (userspace_config.rgb_layer_change) { | 280 | if (userspace_config.rgb_layer_change) { |
| 281 | switch (biton32(state)) { | 281 | switch (biton32(state)) { |
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 572104612..f5bbd0f3b 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -15,8 +15,8 @@ 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 keyboard_post_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 | layer_state_t layer_state_set_rgb(layer_state_t state); |
| 19 | uint32_t default_layer_state_set_rgb(uint32_t state); | 19 | layer_state_t default_layer_state_set_rgb(layer_state_t state); |
| 20 | void rgblight_sethsv_default_helper(uint8_t index); | 20 | void rgblight_sethsv_default_helper(uint8_t index); |
| 21 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | 21 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); |
| 22 | 22 | ||
diff --git a/users/drashna/template.c b/users/drashna/template.c index 0e188f3a5..d90e6bdec 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c | |||
| @@ -62,11 +62,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 62 | 62 | ||
| 63 | 63 | ||
| 64 | __attribute__ ((weak)) | 64 | __attribute__ ((weak)) |
| 65 | uint32_t layer_state_set_keymap (uint32_t state) { | 65 | layer_state_t layer_state_set_keymap (layer_state_t state) { |
| 66 | return state; | 66 | return state; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | uint32_t layer_state_set_user (uint32_t state) { | 69 | layer_state_t layer_state_set_user (layer_state_t state) { |
| 70 | return layer_state_set_keymap (state); | 70 | return layer_state_set_keymap (state); |
| 71 | } | 71 | } |
| 72 | 72 | ||
