diff --git a/keyboards/yandrstudio/biu_nrf52_ble_lib/biu_nrf52.cpp b/keyboards/yandrstudio/biu_nrf52_ble_lib/biu_nrf52.cpp index 3246909e1eeb..2ecd226a76dd 100644 --- a/keyboards/yandrstudio/biu_nrf52_ble_lib/biu_nrf52.cpp +++ b/keyboards/yandrstudio/biu_nrf52_ble_lib/biu_nrf52.cpp @@ -541,6 +541,7 @@ void bluetooth_send_battery_level() { bool bluetooth_init_pre(void) { // start the uart data trans uart_init(BIUNRF52UartBaud); + return true; } @@ -549,7 +550,7 @@ bool bluetooth_init(void) { state.configured = false; state.is_connected = false; - + // bluetooth_init_pre(); // Perform a hardware reset setPinOutput(BIUNRF52ResetPin); writePinHigh(BIUNRF52ResetPin); diff --git a/keyboards/yandrstudio/biu_nrf52_ble_lib/main.c b/keyboards/yandrstudio/biu_nrf52_ble_lib/main.c index 3c23f4c72dbf..4e57b4b17c94 100644 --- a/keyboards/yandrstudio/biu_nrf52_ble_lib/main.c +++ b/keyboards/yandrstudio/biu_nrf52_ble_lib/main.c @@ -99,6 +99,7 @@ void midi_ep_task(void); #ifdef BIU_BLE5_ENABLE void bluetooth_task(void); +bool bluetooth_init_pre(void); #endif /* TESTING @@ -219,9 +220,7 @@ int main(void) { wait_ms(50); } -// #ifdef BIU_BLE5_ENABLE -// bluetooth_init_pre(); -// #endif + /* Do need to wait here! * Otherwise the next print might start a transfer on console EP * before the USB is completely ready, which sometimes causes @@ -233,6 +232,9 @@ int main(void) { keyboard_init(); host_set_driver(driver); +#ifdef BIU_BLE5_ENABLE + bluetooth_init_pre(); +#endif #ifdef SLEEP_LED_ENABLE sleep_led_init();