summaryrefslogtreecommitdiff
path: root/keyboards/kprepublic/bm60hsrgb_poker
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kprepublic/bm60hsrgb_poker')
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h2
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c35
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c33
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h3
-rw-r--r--keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c9
5 files changed, 43 insertions, 39 deletions
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h
index 88c44d4440..66c2883029 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h
@@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define RGB_DI_PIN E2
-#define DRIVER_LED_TOTAL 67
+#define RGB_MATRIX_LED_COUNT 67
#ifdef RGB_DI_PIN
#define RGBLED_NUM 67
#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c
index fb7e9c33c3..8da5f08572 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/david/keymap.c
@@ -1,23 +1,23 @@
/* Copyright 2021 David Martinz
- *
- * 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
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * 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
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_ansi(KC_ESC, 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_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, KC_SLSH,
KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
@@ -29,11 +29,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef RGB_MATRIX_ENABLE
-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) {
// caps lock white
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(28, 200, 200, 200);
- }
+ }
// layer state
switch (get_highest_layer(layer_state)) {
@@ -54,5 +54,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
RGB_MATRIX_INDICATOR_SET_COLOR(59, 128, 128, 128);
break;
}
+ return false;
}
#endif
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c
index 4a438b822b..9979b7baa3 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/keymaps/ipetepete/keymap.c
@@ -1,18 +1,18 @@
/* Copyright 2020 ipetepete
- *
- * 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
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+ *
+ * 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
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include QMK_KEYBOARD_H
enum layers {
@@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
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 );
}
@@ -117,7 +117,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
}
-void rgb_matrix_indicators_kb(void)
+bool rgb_matrix_indicators_user(void)
{
if (!g_suspend_state && rgb_matrix_config.enable) {
switch (get_highest_layer(layer_state)) {
@@ -141,4 +141,5 @@ void rgb_matrix_indicators_kb(void)
break;
}
}
+ return false;
}
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
index 96d8a450c9..c24bfddd39 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/config.h
@@ -58,7 +58,6 @@
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
@@ -133,7 +132,7 @@
# define WS2812_LED_TOTAL RGBLED_NUM
#endif
-#define DRIVER_LED_TOTAL (ISSI_LED_TOTAL + WS2812_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (ISSI_LED_TOTAL + WS2812_LED_TOTAL)
#ifdef RGB_MATRIX_ENABLE
# define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
index 32cfce362f..a9c5508236 100644
--- a/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
+++ b/keyboards/kprepublic/bm60hsrgb_poker/rev2/rev2.c
@@ -21,7 +21,7 @@
# include "is31fl3733.h"
# include "ws2812.h"
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, B_1, A_1, C_1 },
{ 0, B_2, A_2, C_2 },
{ 0, B_3, A_3, C_3 },
@@ -127,11 +127,14 @@ led_config_t g_led_config = {
}
};
-__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(28, 0xFF, 0xFF, 0xFF);
}
+ return true;
}
// clang-format on