mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 03:32:49 +00:00
hci: assert hci_run is executed once after transition to working state
This commit is contained in:
parent
3086bccee3
commit
d0dea5fb1d
12
src/hci.c
12
src/hci.c
@ -6052,21 +6052,25 @@ static bool hci_run_general_pending_commands(void){
|
||||
static void hci_run(void){
|
||||
|
||||
// stack state sub statemachines
|
||||
// halting needs to be called even if we cannot send command packet now
|
||||
switch (hci_stack->state) {
|
||||
case HCI_STATE_INITIALIZING:
|
||||
hci_initializing_run();
|
||||
return;
|
||||
break;
|
||||
case HCI_STATE_HALTING:
|
||||
hci_halting_run();
|
||||
return;
|
||||
break;
|
||||
case HCI_STATE_FALLING_ASLEEP:
|
||||
hci_falling_asleep_run();
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// allow to run after initialization to working transition
|
||||
if (hci_stack->state != HCI_STATE_WORKING){
|
||||
return;
|
||||
}
|
||||
|
||||
bool done;
|
||||
|
||||
// send continuation fragments first, as they block the prepared packet buffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user