Update my code to use layer_state_t typedef
This commit is contained in:
parent
356521864e
commit
89e9785d7a
|
@ -319,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);
|
||||
|
|
|
@ -187,13 +187,13 @@ void matrix_scan_user(void) {
|
|||
|
||||
|
||||
__attribute__ ((weak))
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
// on layer change, no matter where the change was initiated
|
||||
// Then runs keymap's layer change check
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
state = layer_state_set_rgb(state);
|
||||
|
@ -203,12 +203,12 @@ uint32_t layer_state_set_user(uint32_t state) {
|
|||
|
||||
|
||||
__attribute__ ((weak))
|
||||
uint32_t default_layer_state_set_keymap (uint32_t state) {
|
||||
layer_state_t default_layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
// Runs state check and changes underglow color and animation
|
||||
uint32_t default_layer_state_set_user(uint32_t state) {
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
state = default_layer_state_set_keymap(state);
|
||||
#if 0
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
|
|
@ -67,8 +67,8 @@ void shutdown_keymap(void);
|
|||
void suspend_power_down_keymap(void);
|
||||
void suspend_wakeup_init_keymap(void);
|
||||
void matrix_scan_keymap(void);
|
||||
uint32_t layer_state_set_keymap (uint32_t state);
|
||||
uint32_t default_layer_state_set_keymap (uint32_t state);
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state);
|
||||
layer_state_t default_layer_state_set_keymap (layer_state_t state);
|
||||
void led_set_keymap(uint8_t usb_led);
|
||||
void eeconfig_init_keymap(void);
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ void matrix_scan_rgb(void) {
|
|||
}
|
||||
|
||||
|
||||
uint32_t layer_state_set_rgb(uint32_t state) {
|
||||
layer_state_t layer_state_set_rgb(layer_state_t state) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
switch (biton32(state)) {
|
||||
|
|
|
@ -15,8 +15,8 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
|||
void scan_rgblight_fadeout(void);
|
||||
void keyboard_post_init_rgb(void);
|
||||
void matrix_scan_rgb(void);
|
||||
uint32_t layer_state_set_rgb(uint32_t state);
|
||||
uint32_t default_layer_state_set_rgb(uint32_t state);
|
||||
layer_state_t layer_state_set_rgb(layer_state_t state);
|
||||
layer_state_t default_layer_state_set_rgb(layer_state_t state);
|
||||
void rgblight_sethsv_default_helper(uint8_t index);
|
||||
void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue );
|
||||
|
||||
|
|
|
@ -62,11 +62,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
|
||||
__attribute__ ((weak))
|
||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user (uint32_t state) {
|
||||
layer_state_t layer_state_set_user (layer_state_t state) {
|
||||
return layer_state_set_keymap (state);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue