diff options
Diffstat (limited to 'keyboards/rgbkb')
23 files changed, 19 insertions, 51 deletions
diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h index 0c39127af5..cd92c3893d 100644 --- a/keyboards/rgbkb/mun/config.h +++ b/keyboards/rgbkb/mun/config.h @@ -71,7 +71,7 @@ #define RGBLED_SPLIT { 49, 49 } #define RGBLIGHT_ANIMATIONS -#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_LED_COUNT RGBLED_NUM #define RGB_MATRIX_SPLIT RGBLED_SPLIT #define RGB_MATRIX_CENTER { 128, 34 } #define RGB_MATRIX_LED_FLUSH_LIMIT 33 diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h index debd16163b..9fbbfc5901 100644 --- a/keyboards/rgbkb/mun/keymaps/default/config.h +++ b/keyboards/rgbkb/mun/keymaps/default/config.h @@ -17,7 +17,7 @@ #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define STM32_ONBOARD_EEPROM_SIZE 2048 diff --git a/keyboards/rgbkb/mun/keymaps/peott-fr/config.h b/keyboards/rgbkb/mun/keymaps/peott-fr/config.h index 9719d17437..a0b6cced11 100644 --- a/keyboards/rgbkb/mun/keymaps/peott-fr/config.h +++ b/keyboards/rgbkb/mun/keymaps/peott-fr/config.h @@ -17,7 +17,7 @@ #define DISABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define STM32_ONBOARD_EEPROM_SIZE 2048 diff --git a/keyboards/rgbkb/mun/keymaps/via/config.h b/keyboards/rgbkb/mun/keymaps/via/config.h index cfcaa9a1ed..01dc6f1c7d 100644 --- a/keyboards/rgbkb/mun/keymaps/via/config.h +++ b/keyboards/rgbkb/mun/keymaps/via/config.h @@ -17,7 +17,7 @@ #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h index 42e60191fc..7e3fc2d908 100644 --- a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h @@ -29,7 +29,7 @@ #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define OLED_SCROLL_TIMEOUT 20000 #define ONESHOT_TAP_TOGGLE 2 diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h index 5b6ca7e876..35699147db 100644 --- a/keyboards/rgbkb/pan/config.h +++ b/keyboards/rgbkb/pan/config.h @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODER_RESOLUTION 4 #define RGBLED_NUM 64 #define RGBLIGHT_ANIMATIONS -#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_LED_COUNT RGBLED_NUM /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c index c367550e49..f0194ebdfd 100644 --- a/keyboards/rgbkb/pan/pan.c +++ b/keyboards/rgbkb/pan/pan.c @@ -22,13 +22,13 @@ # include "ws2812.h" // LED color buffer -LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; +LED_TYPE rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT]; static void init(void) {} static void flush(void) { // Assumes use of RGB_DI_PIN - ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); + ws2812_setleds(rgb_matrix_ws2812_array, RGB_MATRIX_LED_COUNT); } // Set an led in the buffer to a color @@ -51,7 +51,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { + for (int i = 0; i < ARRAY_SIZE(rgb_matrix_ws2812_array); i++) { setled(i, r, g, b); } } diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 1ce18bc1ab..87241521ae 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -202,7 +202,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE static pin_t encoders_pad_a[] = ENCODERS_PAD_A; -#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) +#define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { [_QWERTY] = ENCODER_LAYOUT( diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index cdd0c6620a..d042a4fe27 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -232,7 +232,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE static pin_t encoders_pad_a[] = ENCODERS_PAD_A; -#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) +#define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { [_QWERTY] = ENCODER_LAYOUT( \ diff --git a/keyboards/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 3e08848f6b..48f341583d 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #else #define RGBLED_NUM 70 #endif -#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_LED_COUNT RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 35 } diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index cdaf9c0536..874ec536b1 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #endif -#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_LED_COUNT RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 37 } diff --git a/keyboards/rgbkb/sol3/config.h b/keyboards/rgbkb/sol3/config.h index 20435a159a..9689f65356 100644 --- a/keyboards/rgbkb/sol3/config.h +++ b/keyboards/rgbkb/sol3/config.h @@ -96,7 +96,7 @@ #define RGBLIGHT_EFFECT_ALTERNATING #define RGBLIGHT_EFFECT_TWINKLE -#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_LED_COUNT RGBLED_NUM #define RGB_MATRIX_SPLIT RGBLED_SPLIT #define RGB_MATRIX_CENTER { 81, 28 } #define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL diff --git a/keyboards/rgbkb/sol3/keymaps/default/config.h b/keyboards/rgbkb/sol3/keymaps/default/config.h index b239f5bb80..7e46726115 100644 --- a/keyboards/rgbkb/sol3/keymaps/default/config.h +++ b/keyboards/rgbkb/sol3/keymaps/default/config.h @@ -17,7 +17,7 @@ #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define STM32_ONBOARD_EEPROM_SIZE 2048 diff --git a/keyboards/rgbkb/sol3/keymaps/kageurufu/config.h b/keyboards/rgbkb/sol3/keymaps/kageurufu/config.h index 400848aa35..b1a8fce865 100644 --- a/keyboards/rgbkb/sol3/keymaps/kageurufu/config.h +++ b/keyboards/rgbkb/sol3/keymaps/kageurufu/config.h @@ -17,7 +17,7 @@ #define DISABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/rgbkb/sol3/keymaps/via/config.h b/keyboards/rgbkb/sol3/keymaps/via/config.h index 3934e6c491..e6aa2bd87b 100644 --- a/keyboards/rgbkb/sol3/keymaps/via/config.h +++ b/keyboards/rgbkb/sol3/keymaps/via/config.h @@ -17,7 +17,7 @@ #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) -// #define RGB_DISABLE_TIMEOUT 1200000 +// #define RGB_MATRIX_TIMEOUT 1200000 #define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h index 38e5590d38..3d3186342f 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h @@ -24,10 +24,6 @@ #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - /* Select hand configuration */ //#define MASTER_LEFT #define EE_HANDS diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h index cdffe6fd50..c150da1cdd 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h @@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - #define EE_HANDS #ifdef COMBO_ENABLE diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h index 4a549c5b1f..76598a3ee5 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h index d813085e46..fa8d58e6c4 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // place overrides here -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h index d7b37d5252..debae6aeb8 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h index d3d1a60ca9..91f63a55ba 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 starcalleramethyst +Copyright 2019 starcalleramethyst This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h index d3e21ea172..f0ded5f66f 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h @@ -19,9 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL #define EE_HANDS #undef RGBLED_NUM diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index 3835a3e705..4c5801f4cf 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_SPLIT { 30, 30 } #endif -#define DRIVER_LED_TOTAL 60 +#define RGB_MATRIX_LED_COUNT 60 #define RGB_MATRIX_SPLIT { 30, 30 } #ifdef IOS_DEVICE_ENABLE |