summaryrefslogtreecommitdiff
path: root/users/kuchosauronad0
diff options
context:
space:
mode:
Diffstat (limited to 'users/kuchosauronad0')
-rw-r--r--users/kuchosauronad0/kuchosauronad0.c6
-rw-r--r--users/kuchosauronad0/kuchosauronad0.h4
-rw-r--r--users/kuchosauronad0/rgblight_user.c20
-rw-r--r--users/kuchosauronad0/template.c4
4 files changed, 17 insertions, 17 deletions
diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c
index a8f17b08ee..820d84daad 100644
--- a/users/kuchosauronad0/kuchosauronad0.c
+++ b/users/kuchosauronad0/kuchosauronad0.c
@@ -117,7 +117,7 @@ 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;
}
@@ -133,12 +133,12 @@ layer_state_t layer_state_set_user(layer_state_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
diff --git a/users/kuchosauronad0/kuchosauronad0.h b/users/kuchosauronad0/kuchosauronad0.h
index da996457c6..5cbd517d67 100644
--- a/users/kuchosauronad0/kuchosauronad0.h
+++ b/users/kuchosauronad0/kuchosauronad0.h
@@ -65,8 +65,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);
diff --git a/users/kuchosauronad0/rgblight_user.c b/users/kuchosauronad0/rgblight_user.c
index 63e412c557..feea0c412f 100644
--- a/users/kuchosauronad0/rgblight_user.c
+++ b/users/kuchosauronad0/rgblight_user.c
@@ -84,7 +84,7 @@ void matrix_scan_rgb(void) {
layer_state_t layer_state_set_rgb(layer_state_t state) {
# ifdef RGBLIGHT_ENABLE
if (userspace_config.rgb_layer_change) {
- switch (biton32(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
+ switch (get_highest_layer(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
case _RAISE:
rgblight_sethsv_noeeprom_green();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
@@ -98,7 +98,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2);
break;
default: // Use a solid color for normal layers
- switch (biton32(default_layer_state)) {
+ switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
rgblight_sethsv_noeeprom_magenta();
break;
@@ -118,7 +118,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
rgblight_sethsv_noeeprom_white();
break;
}
- biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
+ get_highest_layer(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
break;
}
}
@@ -135,7 +135,7 @@ void matrix_scan_indicator(void) {
#endif // !INDICATOR_LIGHTS
void rgblight_fade_helper(bool direction){
- // true: increase val = fade in
+ // true: increase val = fade in
// false: decrease val = fade out
for (uint8_t index = 0; index < RGBLIGHT_VAL_STEP ; index++) {
direction ? rgblight_increase_val() : rgblight_decrease_val();
@@ -147,10 +147,10 @@ void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val){
// fade out, set new hue and saturation, fade in, fade out, set old color, fade in
// this is used in leader.c
// TODO: come up with a better name maybe
- rgblight_fade_helper(false);
- rgblight_sethsv_noeeprom(hue, sat, 0);
- rgblight_fade_helper(true);
- rgblight_fade_helper(false);
- rgblight_sethsv_noeeprom(base_hue, base_sat, 0);
- rgblight_fade_helper(true);
+ rgblight_fade_helper(false);
+ rgblight_sethsv_noeeprom(hue, sat, 0);
+ rgblight_fade_helper(true);
+ rgblight_fade_helper(false);
+ rgblight_sethsv_noeeprom(base_hue, base_sat, 0);
+ rgblight_fade_helper(true);
}
diff --git a/users/kuchosauronad0/template.c b/users/kuchosauronad0/template.c
index 475e45d391..76cc572be3 100644
--- a/users/kuchosauronad0/template.c
+++ b/users/kuchosauronad0/template.c
@@ -63,11 +63,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);
}