summaryrefslogtreecommitdiff
path: root/keyboards/horrortroll
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/horrortroll')
-rw-r--r--keyboards/horrortroll/chinese_pcb/devil68_pro/config.h2
-rw-r--r--keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c3
-rw-r--r--keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c3
-rw-r--r--keyboards/horrortroll/handwired_k552/config.h2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c4
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h7
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c6
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/via/keymap.c4
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h7
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/via/led/custom_gradient.c2
-rw-r--r--keyboards/horrortroll/handwired_k552/keymaps/via/led/random_breath_rainbow.c6
-rw-r--r--keyboards/horrortroll/handwired_k552/lib/wave.c2
13 files changed, 27 insertions, 23 deletions
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h
index 8a227f3c49..1acd13498f 100644
--- a/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h
+++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/config.h
@@ -39,7 +39,7 @@
#define FORCE_NKRO
#ifdef RGB_MATRIX_ENABLE
- #define DRIVER_LED_TOTAL 86
+ #define RGB_MATRIX_LED_COUNT 86
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
index 3a91494536..f1f3aa3cea 100644
--- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
+++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/default/keymap.c
@@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
@@ -184,4 +184,5 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_set_color(30, 0, 0, 0);
}
}
+ return false;
}
diff --git a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c
index 3a91494536..f1f3aa3cea 100644
--- a/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c
+++ b/keyboards/horrortroll/chinese_pcb/devil68_pro/keymaps/via/keymap.c
@@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
HSV hsv = rgb_matrix_config.hsv;
uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1));
hsv.h = time;
@@ -184,4 +184,5 @@ void rgb_matrix_indicators_user(void) {
rgb_matrix_set_color(30, 0, 0, 0);
}
}
+ return false;
}
diff --git a/keyboards/horrortroll/handwired_k552/config.h b/keyboards/horrortroll/handwired_k552/config.h
index d3c385f64e..227fad06ec 100644
--- a/keyboards/horrortroll/handwired_k552/config.h
+++ b/keyboards/horrortroll/handwired_k552/config.h
@@ -62,7 +62,7 @@
#endif
#ifdef RGB_MATRIX_ENABLE
- #define DRIVER_LED_TOTAL 24
+ #define RGB_MATRIX_LED_COUNT 24
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c
index 80bdeacc2b..6e06466d22 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap.c
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_BASE] = LAYOUT_tkl_ansi(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUSE,
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUSE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_WAVE] = LAYOUT_tkl_ansi(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUSE,
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUSE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
index a97b46e5e4..5d854b9396 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h
@@ -75,7 +75,7 @@ enum layer_keycodes {
G_PRE, //Gradient presets
REF_G, //Toggle between linear and reflected gradient
G_FLIP, //Flip the gradient colors
-
+
//Custom led effect keycode
RGB_C_E, //Cycle user effect
};
@@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
{{205, 250, 255}, {140, 215, 125}, false },
};
- uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]);
+ uint8_t gp_length = ARRAY_SIZE(gradient_presets);
switch (keycode) {
case G1_HUI:
@@ -252,7 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
uint8_t side_leds_left[3] = {17, 18, 19};
uint8_t side_leds_right[3] = { 4, 5, 6};
HSV hsv = rgb_matrix_config.hsv;
@@ -297,4 +297,5 @@ void rgb_matrix_indicators_user(void) {
}
}
}
+ return false;
}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
index 49e4a242fb..0d7acd7e8b 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/custom_gradient.c
@@ -70,5 +70,5 @@ static bool CUSTOM_GRADIENT(effect_params_t* params) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
- return led_max < DRIVER_LED_TOTAL;
+ return led_max < RGB_MATRIX_LED_COUNT;
}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c b/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
index 041417477b..29c447c61a 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/default/led/random_breath_rainbow.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-static uint8_t offset[DRIVER_LED_TOTAL];
+static uint8_t offset[RGB_MATRIX_LED_COUNT];
static void doRandom_breath_rainbow(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
@@ -41,7 +41,7 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) {
if (!params->init) {
// Change one LED every tick, make sure speed is not 0
- doRandom_breath_rainbow(rand() % DRIVER_LED_TOTAL, params);
+ doRandom_breath_rainbow(rand() % RGB_MATRIX_LED_COUNT, params);
return false;
}
@@ -51,5 +51,5 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) {
doRandom_breath_rainbow(i, params);
}
- return led_max < DRIVER_LED_TOTAL;
+ return led_max < RGB_MATRIX_LED_COUNT;
}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap.c b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap.c
index 80bdeacc2b..6e06466d22 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap.c
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_BASE] = LAYOUT_tkl_ansi(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUSE,
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUSE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
@@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
[_WAVE] = LAYOUT_tkl_ansi(
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUSE,
+ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUSE,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h
index a97b46e5e4..5d854b9396 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h
+++ b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h
@@ -75,7 +75,7 @@ enum layer_keycodes {
G_PRE, //Gradient presets
REF_G, //Toggle between linear and reflected gradient
G_FLIP, //Flip the gradient colors
-
+
//Custom led effect keycode
RGB_C_E, //Cycle user effect
};
@@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
{{205, 250, 255}, {140, 215, 125}, false },
};
- uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]);
+ uint8_t gp_length = ARRAY_SIZE(gradient_presets);
switch (keycode) {
case G1_HUI:
@@ -252,7 +252,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
uint8_t side_leds_left[3] = {17, 18, 19};
uint8_t side_leds_right[3] = { 4, 5, 6};
HSV hsv = rgb_matrix_config.hsv;
@@ -297,4 +297,5 @@ void rgb_matrix_indicators_user(void) {
}
}
}
+ return false;
}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/led/custom_gradient.c b/keyboards/horrortroll/handwired_k552/keymaps/via/led/custom_gradient.c
index 49e4a242fb..0d7acd7e8b 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/via/led/custom_gradient.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/via/led/custom_gradient.c
@@ -70,5 +70,5 @@ static bool CUSTOM_GRADIENT(effect_params_t* params) {
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}
- return led_max < DRIVER_LED_TOTAL;
+ return led_max < RGB_MATRIX_LED_COUNT;
}
diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/led/random_breath_rainbow.c b/keyboards/horrortroll/handwired_k552/keymaps/via/led/random_breath_rainbow.c
index 041417477b..29c447c61a 100644
--- a/keyboards/horrortroll/handwired_k552/keymaps/via/led/random_breath_rainbow.c
+++ b/keyboards/horrortroll/handwired_k552/keymaps/via/led/random_breath_rainbow.c
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-static uint8_t offset[DRIVER_LED_TOTAL];
+static uint8_t offset[RGB_MATRIX_LED_COUNT];
static void doRandom_breath_rainbow(int i, effect_params_t* params) {
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
@@ -41,7 +41,7 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) {
if (!params->init) {
// Change one LED every tick, make sure speed is not 0
- doRandom_breath_rainbow(rand() % DRIVER_LED_TOTAL, params);
+ doRandom_breath_rainbow(rand() % RGB_MATRIX_LED_COUNT, params);
return false;
}
@@ -51,5 +51,5 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) {
doRandom_breath_rainbow(i, params);
}
- return led_max < DRIVER_LED_TOTAL;
+ return led_max < RGB_MATRIX_LED_COUNT;
}
diff --git a/keyboards/horrortroll/handwired_k552/lib/wave.c b/keyboards/horrortroll/handwired_k552/lib/wave.c
index 79b4e0ced7..700f73aee5 100644
--- a/keyboards/horrortroll/handwired_k552/lib/wave.c
+++ b/keyboards/horrortroll/handwired_k552/lib/wave.c
@@ -68,7 +68,7 @@ void add_keylog(uint16_t keycode) {
keycode = 0;
}
- if (keycode < (sizeof(code_to_name) / sizeof(char))) {
+ if (keycode < ARRAY_SIZE(code_to_name)) {
char log_char = pgm_read_byte(&code_to_name[keycode]);
for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) {