diff options
Diffstat (limited to 'keyboards/hineybush')
25 files changed, 99 insertions, 87 deletions
diff --git a/keyboards/hineybush/h08_ocelot/config.h b/keyboards/hineybush/h08_ocelot/config.h index e275779f4c..5b18aaa265 100644 --- a/keyboards/hineybush/h08_ocelot/config.h +++ b/keyboards/hineybush/h08_ocelot/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -# define RGBLED_NUM 7 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/h08_ocelot/info.json b/keyboards/hineybush/h08_ocelot/info.json index addd71a5a8..f802eea134 100644 --- a/keyboards/hineybush/h08_ocelot/info.json +++ b/keyboards/hineybush/h08_ocelot/info.json @@ -17,7 +17,11 @@ "pin": "F1" }, "rgblight": { - "max_brightness": 220 + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 7, + "max_brightness": 220, + "sleep": true }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/hineybush/h60/config.h b/keyboards/hineybush/h60/config.h index a4d338b500..696c5aefde 100644 --- a/keyboards/hineybush/h60/config.h +++ b/keyboards/hineybush/h60/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - #define RGBLED_NUM 16 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/hineybush/h60/info.json b/keyboards/hineybush/h60/info.json index 3069b4a4b3..964ce2b73d 100644 --- a/keyboards/hineybush/h60/info.json +++ b/keyboards/hineybush/h60/info.json @@ -17,6 +17,12 @@ "pin": "B7", "levels": 12 }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 16, + "sleep": true + }, "ws2812": { "pin": "B0" }, diff --git a/keyboards/hineybush/h65/config.h b/keyboards/hineybush/h65/config.h index ae0ecc61cf..5b18aaa265 100644 --- a/keyboards/hineybush/h65/config.h +++ b/keyboards/hineybush/h65/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -# define RGBLED_NUM 17 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/h65/info.json b/keyboards/hineybush/h65/info.json index dba8541b99..c12588c676 100644 --- a/keyboards/hineybush/h65/info.json +++ b/keyboards/hineybush/h65/info.json @@ -20,6 +20,12 @@ "indicators": { "caps_lock": "E6" }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 17, + "sleep": true + }, "ws2812": { "pin": "D2" }, diff --git a/keyboards/hineybush/h65_hotswap/config.h b/keyboards/hineybush/h65_hotswap/config.h index ae0ecc61cf..5b18aaa265 100644 --- a/keyboards/hineybush/h65_hotswap/config.h +++ b/keyboards/hineybush/h65_hotswap/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -# define RGBLED_NUM 17 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/h65_hotswap/info.json b/keyboards/hineybush/h65_hotswap/info.json index a4c09e02da..f512458e3b 100644 --- a/keyboards/hineybush/h65_hotswap/info.json +++ b/keyboards/hineybush/h65_hotswap/info.json @@ -20,6 +20,12 @@ "indicators": { "caps_lock": "E6" }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 17, + "sleep": true + }, "ws2812": { "pin": "D2" }, diff --git a/keyboards/hineybush/h660s/config.h b/keyboards/hineybush/h660s/config.h index e4d5a87a00..0d893c95c4 100644 --- a/keyboards/hineybush/h660s/config.h +++ b/keyboards/hineybush/h660s/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -# define RGBLED_NUM 16 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ # define RGBLIGHT_EFFECT_BREATHING # define RGBLIGHT_EFFECT_RAINBOW_MOOD # define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/h660s/info.json b/keyboards/hineybush/h660s/info.json index be6e28b261..6e7a96929e 100644 --- a/keyboards/hineybush/h660s/info.json +++ b/keyboards/hineybush/h660s/info.json @@ -17,6 +17,12 @@ "pin": "B7", "breathing": true }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 16, + "sleep": true + }, "ws2812": { "pin": "B0" }, diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h index 760e5fdd70..0299e7c44f 100644 --- a/keyboards/hineybush/h75_singa/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - #define RGBLED_NUM 22 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/h75_singa/info.json b/keyboards/hineybush/h75_singa/info.json index f4a94774f4..bded9c56ad 100644 --- a/keyboards/hineybush/h75_singa/info.json +++ b/keyboards/hineybush/h75_singa/info.json @@ -17,6 +17,12 @@ "pin": "B7", "breathing": true }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 22, + "sleep": true + }, "ws2812": { "pin": "B3" }, diff --git a/keyboards/hineybush/h87a/config.h b/keyboards/hineybush/h87a/config.h index 26b995ddd0..05b7afca12 100644 --- a/keyboards/hineybush/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -32,8 +32,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define RGBLED_NUM 24 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep diff --git a/keyboards/hineybush/h87a/info.json b/keyboards/hineybush/h87a/info.json index ee067e1f32..5c9f9dc620 100644 --- a/keyboards/hineybush/h87a/info.json +++ b/keyboards/hineybush/h87a/info.json @@ -20,7 +20,11 @@ "pin": "D3" }, "rgblight": { - "max_brightness": 200 + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 24, + "max_brightness": 200, + "sleep": true }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c index 76fd4abae9..6d064455b3 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c @@ -278,15 +278,16 @@ void led_init_ports(void) { DDRE |= (1<<6); // OUT } -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { DDRD |= (1 << 5); PORTD &= ~(1 << 5); } else { DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); } - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + if (led_state.scroll_lock) { DDRE |= (1 << 6); PORTE &= ~(1 << 6); } else { DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); } + return false; } diff --git a/keyboards/hineybush/h88/config.h b/keyboards/hineybush/h88/config.h index 0eb28d50c1..a60fa381e9 100644 --- a/keyboards/hineybush/h88/config.h +++ b/keyboards/hineybush/h88/config.h @@ -32,8 +32,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define RGBLED_NUM 24 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep diff --git a/keyboards/hineybush/h88/info.json b/keyboards/hineybush/h88/info.json index 7c78582c76..931b56eb93 100644 --- a/keyboards/hineybush/h88/info.json +++ b/keyboards/hineybush/h88/info.json @@ -16,6 +16,12 @@ "backlight": { "pin": "B7" }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 24, + "sleep": true + }, "ws2812": { "pin": "D3" }, diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h index ee8f76aafd..c17a8fd6ef 100644 --- a/keyboards/hineybush/hbcp/config.h +++ b/keyboards/hineybush/hbcp/config.h @@ -35,14 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B1, B6, D0, C7, C6, C5 } #define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } -//EITHERWAY is supported through a custom matrix -//#define DIODE_DIRECTION EITHERWAY - - #define RGBLED_NUM 27 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/hbcp/hbcp.c b/keyboards/hineybush/hbcp/hbcp.c index d4601cd2e3..7d0f5ecf73 100644 --- a/keyboards/hineybush/hbcp/hbcp.c +++ b/keyboards/hineybush/hbcp/hbcp.c @@ -45,32 +45,40 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! #ifdef RGBLIGHT_ENABLE -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - sethsv_raw(HSV_CAPS, (LED_TYPE *)&led[0]); - } else { - sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); - } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - sethsv_raw(HSV_NLCK, (LED_TYPE *)&led[1]); - } else { - sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - sethsv_raw(HSV_SCRL, (LED_TYPE *)&led[2]); - } else { - sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); +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, (LED_TYPE *)&led[0]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); + } + if (led_state.num_lock) { + sethsv_raw(HSV_NLCK, (LED_TYPE *)&led[1]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); + } + if (led_state.scroll_lock) { + sethsv_raw(HSV_SCRL, (LED_TYPE *)&led[2]); + } else { + sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); + } + rgblight_set(); } - rgblight_set(); + return false; } __attribute__ ((weak)) void keyboard_post_init_user(void) { rgblight_set_effect_range(3, RGBLED_NUM-3); - led_set_user(_BV(USB_LED_CAPS_LOCK)|_BV(USB_LED_NUM_LOCK)|_BV(USB_LED_SCROLL_LOCK)); + led_t led_state = { + .caps_lock = true, + .num_lock = true, + .scroll_lock = true + }; + led_update_kb(led_state); wait_ms(300); - led_set_user(0); + led_update_kb((led_t){0}); } __attribute__ ((weak)) diff --git a/keyboards/hineybush/hbcp/info.json b/keyboards/hineybush/hbcp/info.json index 45d52629ae..858551e087 100644 --- a/keyboards/hineybush/hbcp/info.json +++ b/keyboards/hineybush/hbcp/info.json @@ -16,7 +16,11 @@ "pin": "B0" }, "rgblight": { - "max_brightness": 200 + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 27, + "max_brightness": 200, + "sleep": true }, "processor": "at90usb1286", "bootloader": "atmel-dfu", diff --git a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c index 5f1d7700f6..26a67fe7ca 100644 --- a/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c +++ b/keyboards/hineybush/hbcp/keymaps/hiney/keymap.c @@ -77,23 +77,24 @@ void matrix_scan_user(void) { #ifdef RGBLIGHT_ENABLE // The first three LEDs are used as indicators for CAPS_LOCK, NUM_LOCK and SCROLL_LOCK. -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { sethsv_raw(HSV_SOFT_RED, (LED_TYPE *)&led[0]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[0]); } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + if (led_state.num_lock) { sethsv_raw(HSV_WARM_WHITE, (LED_TYPE *)&led[1]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[1]); } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + if (led_state.scroll_lock) { sethsv_raw(HSV_SOFT_BLUE, (LED_TYPE *)&led[2]); } else { sethsv(HSV_BLACK, (LED_TYPE *)&led[2]); } rgblight_set(); + return false; } #endif diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index 848c217499..0299e7c44f 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - #define RGBLED_NUM 26 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/physix/info.json b/keyboards/hineybush/physix/info.json index 191621ff47..c4a0948682 100644 --- a/keyboards/hineybush/physix/info.json +++ b/keyboards/hineybush/physix/info.json @@ -17,6 +17,12 @@ "pin": "B7", "breathing": true }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 26, + "sleep": true + }, "ws2812": { "pin": "E6" }, diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h index 98b32f8c37..7dc082706d 100644 --- a/keyboards/hineybush/sm68/config.h +++ b/keyboards/hineybush/sm68/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - #define RGBLED_NUM 16 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL diff --git a/keyboards/hineybush/sm68/info.json b/keyboards/hineybush/sm68/info.json index 6029c4faf9..f9e003f8c9 100644 --- a/keyboards/hineybush/sm68/info.json +++ b/keyboards/hineybush/sm68/info.json @@ -13,6 +13,12 @@ "rows": ["B2", "B1", "B0", "D4", "D1"] }, "diode_direction": "COL2ROW", + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 16, + "sleep": true + }, "ws2812": { "pin": "D0" }, |