summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Hinnebusch <joshhinnebusch@gmail.com>2020-09-01 12:05:03 -0400
committerGitHub <noreply@github.com>2020-09-01 09:05:03 -0700
commit744940bbd9ed0c346a3d9259422853b7e4c76a7d (patch)
treed0fe97ed97807524b4e770c82e66579db0c180db
parent0bec817479aefd438ccd32b60f66087daa141e5c (diff)
hineybush/h88: update h88 LED stuff (#10101)
* update h88.c * Update keyboards/hineybush/h88/h88.c
-rw-r--r--keyboards/hineybush/h88/h88.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c
index 1f702e9e9d..adfb64bef1 100644
--- a/keyboards/hineybush/h88/h88.c
+++ b/keyboards/hineybush/h88/h88.c
@@ -18,7 +18,8 @@
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
-
+ setPinOutput(D5);
+ setPinOutput(E6);
matrix_init_user();
}
@@ -42,26 +43,19 @@ void led_set_kb(uint8_t usb_led) {
led_set_user(usb_led);
}
-void led_init_ports(void) {
- setPinOutput(D5);
- setPinOutput(E6);
+bool led_update_kb(led_t led_state) {
+ if(led_update_user(led_state)) {
+ writePin(D5, !led_state.caps_lock);
+ writePin(E6, !led_state.scroll_lock);
+ }
+ return true;
}
-void led_set_user(uint8_t usb_led) {
-
- if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- setPinOutput(D5);
- writePinLow(D5);
- } else {
- setPinInput(D5);
- }
-
- if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- setPinOutput(E6);
- writePinLow(E6);
- } else {
- setPinInput(E6);
- }
+void eeconfig_init_kb(void) { // EEPROM is getting reset!
+ rgblight_enable(); // Enable RGB by default
+ rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness
+ rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
+ eeconfig_update_kb(0);
+ eeconfig_init_user();
}
-