Skip to content

Commit cc0c062

Browse files
committed
pbio/drv/bluetooth: Don't wait on power initialization.
Since all Bluetooth commands are buffered and handled by the event loop, we don't need to wait for the driver to fully power on before leaving `pbdrv`. This allows power on to complete in the background while we initialize pbio and do hmi boot animations in pbsys, saving about half the boot time on SPIKE Prime.
1 parent dff7279 commit cc0c062

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

lib/pbio/drv/bluetooth/bluetooth.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ void pbdrv_bluetooth_init(void) {
6666
// as soon as the previous one completes + 1 byte for ring buf pointer
6767
static uint8_t stdout_buf[PBDRV_BLUETOOTH_MAX_CHAR_SIZE * 2 + 1];
6868
lwrb_init(&stdout_ring_buf, stdout_buf, PBIO_ARRAY_SIZE(stdout_buf));
69-
pbio_busy_count_up();
7069

7170
pbdrv_bluetooth_init_hci();
7271
}
@@ -435,8 +434,6 @@ pbio_error_t pbdrv_bluetooth_process_thread(pbio_os_state_t *state, void *contex
435434

436435
DEBUG_PRINT("Bluetooth is now on and initialized.\n");
437436

438-
pbio_busy_count_down();
439-
440437
pbio_os_timer_set(&status_timer, PBDRV_BLUETOOTH_STATUS_UPDATE_INTERVAL);
441438

442439
// Service scheduled tasks as long as Bluetooth is enabled.

0 commit comments

Comments
 (0)