bluetooth: hci: SPI backend boot timeout
Add a timeout to the SPI boot process to ensure that `bt_enable` does not block forever but instead returns an error after an appropriately large delay. While 1 second would be sufficient under normal operation, we also want to give the controller time to perform any application upgrades via a bootloader. Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
parent
ce4240f893
commit
c3139c59d0
3 changed files with 19 additions and 3 deletions
|
@ -81,6 +81,16 @@ config BT_SPI_INIT_PRIORITY
|
|||
depends on BT_SPI
|
||||
default 75
|
||||
|
||||
config BT_SPI_BOOT_TIMEOUT_SEC
|
||||
int "Seconds to wait for SPI device to report ready"
|
||||
depends on BT_SPI_ZEPHYR || BT_SPI_BLUENRG
|
||||
default 30
|
||||
help
|
||||
Maximum duration for a HCI SPI Controller to report ready through the
|
||||
Zephyr Project defined `EVT_BLUE_INITIALIZED` HCI vendor event.
|
||||
Default is 30 seconds to support a bootloader image swap on the
|
||||
Controller.
|
||||
|
||||
config BT_SPI_ZEPHYR
|
||||
bool
|
||||
default y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue