diff --git a/keyboards/keychron/k2_pro/k2_pro.c b/keyboards/keychron/k2_pro/k2_pro.c index 12e2494716..4b49a7854b 100644 --- a/keyboards/keychron/k2_pro/k2_pro.c +++ b/keyboards/keychron/k2_pro/k2_pro.c @@ -273,7 +273,7 @@ void battery_calculte_voltage(uint16_t value) { battery_set_voltage(voltage); } -void via_command_kb(uint8_t *data, uint8_t length) { +bool via_command_kb(uint8_t *data, uint8_t length) { switch (data[0]) { #ifdef KC_BLUETOOTH_ENABLE case 0xAA: @@ -285,7 +285,11 @@ void via_command_kb(uint8_t *data, uint8_t length) { factory_test_rx(data, length); break; #endif + default: + return false; } + + return true; } #if !defined(VIA_ENABLE) diff --git a/keyboards/keychron/k6_pro/k6_pro.c b/keyboards/keychron/k6_pro/k6_pro.c index f362d54a48..d5d694177f 100644 --- a/keyboards/keychron/k6_pro/k6_pro.c +++ b/keyboards/keychron/k6_pro/k6_pro.c @@ -270,7 +270,7 @@ void battery_calculte_voltage(uint16_t value) { battery_set_voltage(voltage); } -void via_command_kb(uint8_t *data, uint8_t length) { +bool via_command_kb(uint8_t *data, uint8_t length) { switch (data[0]) { #ifdef KC_BLUETOOTH_ENABLE case 0xAA: @@ -282,7 +282,11 @@ void via_command_kb(uint8_t *data, uint8_t length) { factory_test_rx(data, length); break; #endif + default: + return false; } + + return true; } #if !defined(VIA_ENABLE) diff --git a/keyboards/keychron/k8_pro/k8_pro.c b/keyboards/keychron/k8_pro/k8_pro.c index e772aaf909..d6ae6a649f 100644 --- a/keyboards/keychron/k8_pro/k8_pro.c +++ b/keyboards/keychron/k8_pro/k8_pro.c @@ -159,7 +159,7 @@ void keyboard_post_init_kb(void) { power_on_indicator_timer_buffer = sync_timer_read32() | 1; writePin(BAT_LOW_LED_PIN, BAT_LOW_LED_PIN_ON_STATE); writePin(LED_CAPS_LOCK_PIN, LED_PIN_ON_STATE); -#ifdef KC_BLUETOOTH_ENABLE +# ifdef KC_BLUETOOTH_ENABLE writePin(H3, HOST_LED_PIN_ON_STATE); # endif @@ -280,7 +280,7 @@ void battery_calculte_voltage(uint16_t value) { battery_set_voltage(voltage); } -void via_command_kb(uint8_t *data, uint8_t length) { +bool via_command_kb(uint8_t *data, uint8_t length) { switch (data[0]) { #ifdef KC_BLUETOOTH_ENABLE case 0xAA: @@ -292,7 +292,11 @@ void via_command_kb(uint8_t *data, uint8_t length) { factory_test_rx(data, length); break; #endif + default: + return false; } + + return true; } #if !defined(VIA_ENABLE)