mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-06 03:40:16 +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){
|
static void hci_run(void){
|
||||||
|
|
||||||
// stack state sub statemachines
|
// stack state sub statemachines
|
||||||
// halting needs to be called even if we cannot send command packet now
|
|
||||||
switch (hci_stack->state) {
|
switch (hci_stack->state) {
|
||||||
case HCI_STATE_INITIALIZING:
|
case HCI_STATE_INITIALIZING:
|
||||||
hci_initializing_run();
|
hci_initializing_run();
|
||||||
return;
|
break;
|
||||||
case HCI_STATE_HALTING:
|
case HCI_STATE_HALTING:
|
||||||
hci_halting_run();
|
hci_halting_run();
|
||||||
return;
|
break;
|
||||||
case HCI_STATE_FALLING_ASLEEP:
|
case HCI_STATE_FALLING_ASLEEP:
|
||||||
hci_falling_asleep_run();
|
hci_falling_asleep_run();
|
||||||
return;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// allow to run after initialization to working transition
|
||||||
|
if (hci_stack->state != HCI_STATE_WORKING){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool done;
|
bool done;
|
||||||
|
|
||||||
// send continuation fragments first, as they block the prepared packet buffer
|
// send continuation fragments first, as they block the prepared packet buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user