summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/k8_pro
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-09-22 17:33:56 +0800
committerlokher <lokher@gmail.com>2022-09-22 17:33:56 +0800
commitf67150f16cb0e5bc71dc3320750ff96ba99e96dc (patch)
tree559bf802f0737dac2e0d4892577818d10d7c9f39 /keyboards/keychron/k8_pro
parent9581289745736ce068a1040f44cec37a2ca8830d (diff)
refactor indicator.c; fix LED/RGB_MATRIX_BRIGHTNESS_TURN_OFF_VAL related issue
Diffstat (limited to 'keyboards/keychron/k8_pro')
-rw-r--r--keyboards/keychron/k8_pro/k8_pro.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/keyboards/keychron/k8_pro/k8_pro.c b/keyboards/keychron/k8_pro/k8_pro.c
index 58b1e70779..19852b0c06 100644
--- a/keyboards/keychron/k8_pro/k8_pro.c
+++ b/keyboards/keychron/k8_pro/k8_pro.c
@@ -67,7 +67,11 @@ bool dip_switch_update_kb(uint8_t index, bool active) {
return true;
}
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+#ifdef BLUETOOTH_ENABLE
+bool process_record_kb_bt(uint16_t keycode, keyrecord_t *record) {
+#else
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+#endif
static uint8_t host_idx = 0;
switch (keycode) {
@@ -136,7 +140,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void keyboard_post_init_user(void) {
+void keyboard_post_init_kb(void) {
dip_switch_read(true);
#ifdef BLUETOOTH_ENABLE
@@ -158,9 +162,11 @@ void keyboard_post_init_user(void) {
#ifdef BLUETOOTH_ENABLE
writePin(H3, HOST_LED_PIN_ON_STATE);
# endif
+
+ keyboard_post_init_user();
}
-void matrix_scan_user(void) {
+void matrix_scan_kb(void) {
if (power_on_indicator_timer_buffer) {
if (sync_timer_elapsed32(power_on_indicator_timer_buffer) > POWER_ON_LED_DURATION) {
power_on_indicator_timer_buffer = 0;
@@ -184,6 +190,7 @@ void matrix_scan_user(void) {
#ifdef FACTORY_RESET_TASK
FACTORY_RESET_TASK();
# endif
+ matrix_scan_user();
}
#ifdef BLUETOOTH_ENABLE