summaryrefslogtreecommitdiff
path: root/keyboards/dztech/dz60rgb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dztech/dz60rgb')
-rw-r--r--keyboards/dztech/dz60rgb/dz60rgb.c19
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c4
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c6
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c6
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c3
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c35
-rw-r--r--keyboards/dztech/dz60rgb/v1/config.h3
-rw-r--r--keyboards/dztech/dz60rgb/v2/config.h3
-rw-r--r--keyboards/dztech/dz60rgb/v2_1/config.h3
9 files changed, 29 insertions, 53 deletions
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c
index 81f4846c2c..cfefd2833d 100644
--- a/keyboards/dztech/dz60rgb/dz60rgb.c
+++ b/keyboards/dztech/dz60rgb/dz60rgb.c
@@ -1,7 +1,7 @@
#include "dz60rgb.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, K_14, J_14, L_14 },
{ 0, K_13, J_13, L_13 },
{ 0, K_12, J_12, L_12 },
@@ -93,20 +93,13 @@ led_config_t g_led_config = {
}
};
-void suspend_power_down_kb(void) {
- rgb_matrix_set_suspend_state(true);
- suspend_power_down_user();
-}
-
-void suspend_wakeup_init_kb(void) {
- rgb_matrix_set_suspend_state(false);
- suspend_wakeup_init_user();
-}
-
-__attribute__ ((weak))
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
}
+ return true;
}
#endif
diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c
index 287496e17f..3552864e8c 100644
--- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c
@@ -91,8 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
};
-void rgb_matrix_indicators_user(void)
-{
+bool rgb_matrix_indicators_user(void) {
uint8_t this_led = host_keyboard_leds();
if (!g_suspend_state && rgb_matrix_config.enable) {
@@ -218,6 +217,7 @@ void rgb_matrix_indicators_user(void)
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
}
+ return false;
}
void matrix_init_user(void)
diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
index 3fe99fd61b..efed4494ef 100644
--- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
@@ -50,15 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}
-void rgb_matrix_indicators_user(void)
-{
+bool rgb_matrix_indicators_user(void) {
uint8_t this_led = host_keyboard_leds();
if (!g_suspend_state && rgb_matrix_config.enable) {
@@ -151,6 +150,7 @@ void rgb_matrix_indicators_user(void)
rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
break;
}
+ return false;
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c
index eeffe66f40..841617e2c9 100644
--- a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c
@@ -27,15 +27,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
+ for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
rgb_matrix_set_color( i, red, green, blue );
}
}
}
-void rgb_matrix_indicators_user(void)
-{
+bool rgb_matrix_indicators_user(void) {
if (!g_suspend_state) {
switch (get_highest_layer(layer_state)) {
case _QWERTY:
@@ -113,6 +112,7 @@ void rgb_matrix_indicators_user(void)
rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
break;
}
+ return false;
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c
index b6644ed14b..4b4a4e2877 100644
--- a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c
@@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
+bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
led_t led_state = host_keyboard_led_state();
if (led_state.caps_lock) {
@@ -227,4 +227,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x33, 0x66, 0x99);
RGB_MATRIX_INDICATOR_SET_COLOR(26, 0x33, 0x66, 0x99);
}
+ return false;
}
diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c
index 1de0d2632d..25b6e4f472 100644
--- a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c
@@ -4,34 +4,19 @@
#define _LAYER2 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_LAYER0] = LAYOUT(KC_GESC, 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_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_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,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL),
+ [_LAYER0] = LAYOUT(KC_GESC, 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_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_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,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
[_LAYER1] = LAYOUT(KC_TRNS, 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_DEL,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT,
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST,
+ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT,
+ KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_VOLU, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
- [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL,
- KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS,
+ [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL,
+ KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
-
-void rgb_matrix_indicators_user(void) {
-}
-
-void matrix_init_user(void) {
- //user initialization
-}
-
-void matrix_scan_user(void) {
- //user matrix
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
- }
diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h
index b150e4a162..92ee0f31ae 100644
--- a/keyboards/dztech/dz60rgb/v1/config.h
+++ b/keyboards/dztech/dz60rgb/v1/config.h
@@ -24,7 +24,6 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
@@ -81,5 +80,5 @@
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_COUNT 1
-# define DRIVER_LED_TOTAL 63
+# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h
index 3c6d07121b..57749b4e55 100644
--- a/keyboards/dztech/dz60rgb/v2/config.h
+++ b/keyboards/dztech/dz60rgb/v2/config.h
@@ -24,7 +24,6 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
@@ -79,5 +78,5 @@
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_COUNT 1
-# define DRIVER_LED_TOTAL 63
+# define RGB_MATRIX_LED_COUNT 63
#endif
diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h
index 2079390a3b..f7381175c8 100644
--- a/keyboards/dztech/dz60rgb/v2_1/config.h
+++ b/keyboards/dztech/dz60rgb/v2_1/config.h
@@ -40,7 +40,6 @@
#define DEBOUNCE 3
#ifdef RGB_MATRIX_ENABLE
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
@@ -95,5 +94,5 @@
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_COUNT 1
-# define DRIVER_LED_TOTAL 63
+# define RGB_MATRIX_LED_COUNT 63
#endif