mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-22 00:16:41 +06:00
[keyboard] Prevent LED flicker when connecting AnnePro 2 (#19709)
This commit is contained in:
parent
bcfe67883e
commit
a5e7390419
|
@ -101,11 +101,9 @@ void keyboard_post_init_kb(void) {
|
||||||
// loop to clear out receive buffer from ble wakeup
|
// loop to clear out receive buffer from ble wakeup
|
||||||
while (!sdGetWouldBlock(&SD1)) sdGet(&SD1);
|
while (!sdGetWouldBlock(&SD1)) sdGet(&SD1);
|
||||||
|
|
||||||
ap2_led_get_status();
|
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
ap2_led_enable();
|
|
||||||
ap2_led_set_manual_control(1);
|
ap2_led_set_manual_control(1);
|
||||||
|
ap2_led_enable();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
keyboard_post_init_user();
|
keyboard_post_init_user();
|
||||||
|
|
|
@ -60,8 +60,6 @@ void ap2_led_enable(void) { proto_tx(CMD_LED_ON, NULL, 0, 3); }
|
||||||
|
|
||||||
void ap2_led_set_profile(uint8_t prof) { proto_tx(CMD_LED_SET_PROFILE, &prof, sizeof(prof), 3); }
|
void ap2_led_set_profile(uint8_t prof) { proto_tx(CMD_LED_SET_PROFILE, &prof, sizeof(prof), 3); }
|
||||||
|
|
||||||
void ap2_led_get_status(void) { proto_tx(CMD_LED_GET_STATUS, NULL, 0, 3); }
|
|
||||||
|
|
||||||
void ap2_led_next_profile(void) { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); }
|
void ap2_led_next_profile(void) { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); }
|
||||||
|
|
||||||
void ap2_led_next_intensity(void) { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); }
|
void ap2_led_next_intensity(void) { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); }
|
||||||
|
|
|
@ -49,7 +49,6 @@ void ap2_set_IAP(void);
|
||||||
void ap2_led_disable(void);
|
void ap2_led_disable(void);
|
||||||
void ap2_led_enable(void);
|
void ap2_led_enable(void);
|
||||||
void ap2_led_set_profile(uint8_t prof);
|
void ap2_led_set_profile(uint8_t prof);
|
||||||
void ap2_led_get_status(void);
|
|
||||||
void ap2_led_next_profile(void);
|
void ap2_led_next_profile(void);
|
||||||
void ap2_led_prev_profile(void);
|
void ap2_led_prev_profile(void);
|
||||||
void ap2_led_next_intensity(void);
|
void ap2_led_next_intensity(void);
|
||||||
|
|
|
@ -36,7 +36,7 @@ enum {
|
||||||
CMD_LED_MASK_SET_MONO = 0x12,
|
CMD_LED_MASK_SET_MONO = 0x12,
|
||||||
|
|
||||||
/* Reactive / status */
|
/* Reactive / status */
|
||||||
CMD_LED_GET_STATUS = 0x20,
|
CMD_LED_GET_STATUS = 0x20, /* unused */
|
||||||
CMD_LED_KEY_BLINK = 0x21,
|
CMD_LED_KEY_BLINK = 0x21,
|
||||||
CMD_LED_KEY_DOWN = 0x22,
|
CMD_LED_KEY_DOWN = 0x22,
|
||||||
CMD_LED_KEY_UP = 0x23, /* TODO */
|
CMD_LED_KEY_UP = 0x23, /* TODO */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user