Skip to content

Commit 8887101

Browse files
committed
Add a dummy implementation to make bt_disable() not fail
To allow turning Bluetooth on and off on the Track Mini.
1 parent bf504a4 commit 8887101

File tree

1 file changed

+8
-0
lines changed
  • drivers/bluetooth/hci

1 file changed

+8
-0
lines changed

drivers/bluetooth/hci/h4.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,18 @@ static int h4_setup(const struct bt_hci_setup_params *params)
527527
}
528528
#endif
529529

530+
static int h4_close(void)
531+
{
532+
/* NOTE: dummy implementition to make bt_disable not fail – ESP32 is
533+
* turned off after that anyways */
534+
return 0;
535+
}
536+
530537
static const struct bt_hci_driver drv = {
531538
.name = "H:4",
532539
.bus = BT_HCI_DRIVER_BUS_UART,
533540
.open = h4_open,
541+
.close = h4_close,
534542
.send = h4_send,
535543
#if defined(CONFIG_BT_HCI_SETUP)
536544
.setup = h4_setup

0 commit comments

Comments
 (0)