diff options
| author | Josh Hinnebusch <joshhinnebusch@gmail.com> | 2020-09-01 12:05:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-01 09:05:03 -0700 |
| commit | 744940bbd9ed0c346a3d9259422853b7e4c76a7d (patch) | |
| tree | d0fe97ed97807524b4e770c82e66579db0c180db /keyboards/hineybush | |
| parent | 0bec817479aefd438ccd32b60f66087daa141e5c (diff) | |
| download | qmk_firmware-744940bbd9ed0c346a3d9259422853b7e4c76a7d.tar.gz qmk_firmware-744940bbd9ed0c346a3d9259422853b7e4c76a7d.zip | |
hineybush/h88: update h88 LED stuff (#10101)
* update h88.c
* Update keyboards/hineybush/h88/h88.c
Diffstat (limited to 'keyboards/hineybush')
| -rw-r--r-- | keyboards/hineybush/h88/h88.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 1f702e9e9..adfb64bef 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c | |||
| @@ -18,7 +18,8 @@ | |||
| 18 | void matrix_init_kb(void) { | 18 | void matrix_init_kb(void) { |
| 19 | // put your keyboard start-up code here | 19 | // put your keyboard start-up code here |
| 20 | // runs once when the firmware starts up | 20 | // runs once when the firmware starts up |
| 21 | 21 | setPinOutput(D5); | |
| 22 | setPinOutput(E6); | ||
| 22 | matrix_init_user(); | 23 | matrix_init_user(); |
| 23 | } | 24 | } |
| 24 | 25 | ||
| @@ -42,26 +43,19 @@ void led_set_kb(uint8_t usb_led) { | |||
| 42 | led_set_user(usb_led); | 43 | led_set_user(usb_led); |
| 43 | } | 44 | } |
| 44 | 45 | ||
| 45 | void led_init_ports(void) { | 46 | bool led_update_kb(led_t led_state) { |
| 46 | setPinOutput(D5); | 47 | if(led_update_user(led_state)) { |
| 47 | setPinOutput(E6); | 48 | writePin(D5, !led_state.caps_lock); |
| 49 | writePin(E6, !led_state.scroll_lock); | ||
| 50 | } | ||
| 51 | return true; | ||
| 48 | } | 52 | } |
| 49 | 53 | ||
| 50 | void led_set_user(uint8_t usb_led) { | 54 | void eeconfig_init_kb(void) { // EEPROM is getting reset! |
| 51 | 55 | rgblight_enable(); // Enable RGB by default | |
| 52 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | 56 | rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness |
| 53 | setPinOutput(D5); | 57 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default |
| 54 | writePinLow(D5); | ||
| 55 | } else { | ||
| 56 | setPinInput(D5); | ||
| 57 | } | ||
| 58 | |||
| 59 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
| 60 | setPinOutput(E6); | ||
| 61 | writePinLow(E6); | ||
| 62 | } else { | ||
| 63 | setPinInput(E6); | ||
| 64 | } | ||
| 65 | 58 | ||
| 59 | eeconfig_update_kb(0); | ||
| 60 | eeconfig_init_user(); | ||
| 66 | } | 61 | } |
| 67 | |||
