aboutsummaryrefslogtreecommitdiff
path: root/keyboards/hineybush/hbcp/hbcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/hineybush/hbcp/hbcp.c')
-rw-r--r--keyboards/hineybush/hbcp/hbcp.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c
index 754b63b200..e422b46fdc 100644
--- a/keyboards/hineybush/hbcp/hbcp.c
+++ b/keyboards/hineybush/hbcp/hbcp.c
@@ -49,21 +49,20 @@ bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
if (led_state.caps_lock) {
- sethsv_raw(HSV_CAPS, (rgb_led_t *)&led[0]);
+ rgblight_sethsv_at(HSV_CAPS, 0);
} else {
- sethsv(HSV_BLACK, (rgb_led_t *)&led[0]);
+ rgblight_sethsv_at(HSV_BLACK, 0);
}
if (led_state.num_lock) {
- sethsv_raw(HSV_NLCK, (rgb_led_t *)&led[1]);
+ rgblight_sethsv_at(HSV_NLCK, 1);
} else {
- sethsv(HSV_BLACK, (rgb_led_t *)&led[1]);
+ rgblight_sethsv_at(HSV_BLACK, 1);
}
if (led_state.scroll_lock) {
- sethsv_raw(HSV_SCRL, (rgb_led_t *)&led[2]);
+ rgblight_sethsv_at(HSV_SCRL, 2);
} else {
- sethsv(HSV_BLACK, (rgb_led_t *)&led[2]);
+ rgblight_sethsv_at(HSV_BLACK, 2);
}
- rgblight_set();
}
return false;
}
@@ -83,12 +82,9 @@ void keyboard_post_init_user(void) {
__attribute__ ((weak))
void hbcp_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
- rgb_led_t tmp_led;
- sethsv_raw(hue, sat, val, &tmp_led);
for (uint8_t i = start; i < end; i++) {
- led[i] = tmp_led;
+ rgblight_sethsv_at(hue, sat, val, i);
}
- rgblight_set();
}
#endif