Loading system/bta/sys/bta_sys.h +10 −0 Original line number Diff line number Diff line Loading @@ -173,9 +173,19 @@ enum { }; typedef uint8_t tBTA_SYS_HW_EVT; /* SYS HW state */ enum { BTA_SYS_HW_OFF, BTA_SYS_HW_STARTING, BTA_SYS_HW_ON, BTA_SYS_HW_STOPPING }; typedef uint8_t tBTA_SYS_HW_STATE; /***************************************************************************** * Function declarations ****************************************************************************/ void bta_sys_set_state(tBTA_SYS_HW_STATE value); extern void bta_sys_init(void); extern void bta_sys_free(void); Loading system/bta/sys/bta_sys_int.h +0 −9 Original line number Diff line number Diff line Loading @@ -32,15 +32,6 @@ * state table ****************************************************************************/ /* SYS HW state */ enum { BTA_SYS_HW_OFF, BTA_SYS_HW_STARTING, BTA_SYS_HW_ON, BTA_SYS_HW_STOPPING }; typedef uint8_t tBTA_SYS_HW_STATE; /* Collision callback */ #define MAX_COLLISION_REG 5 Loading system/bta/sys/bta_sys_main.cc +0 −10 Original line number Diff line number Diff line Loading @@ -88,10 +88,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { switch (bta_sys_cb.state) { case BTA_SYS_HW_OFF: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_set_state(BTA_SYS_HW_STARTING); bta_sys_hw_api_enable(); break; case BTA_SYS_EVT_STACK_ENABLED_EVT: bta_sys_set_state(BTA_SYS_HW_ON); break; Loading Loading @@ -121,9 +117,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { break; case BTA_SYS_HW_ON: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_hw_api_enable(); break; case BTA_SYS_API_DISABLE_EVT: bta_sys_hw_api_disable(); break; Loading @@ -136,9 +129,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { break; case BTA_SYS_HW_STOPPING: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_set_state(BTA_SYS_HW_STARTING); break; case BTA_SYS_EVT_STACK_ENABLED_EVT: BTA_dm_on_hw_on(); bta_sys_hw_api_disable(); Loading system/btif/src/stack_manager.cc +3 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ #if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE) #include "bta_ar_api.h" #endif #include "bta/sys/bta_sys_int.h" #include "bta_dm_int.h" using bluetooth::common::MessageLoopThread; Loading Loading @@ -225,7 +226,8 @@ static void event_start_up_stack(UNUSED_ATTR void* context) { BTA_dm_init(); bta_dm_enable(bte_dm_evt); send_bta_sys_hw_event(BTA_SYS_API_ENABLE_EVT); bta_sys_set_state(BTA_SYS_HW_STARTING); bta_sys_hw_api_enable(); if (future_await(local_hack_future) != FUTURE_SUCCESS) { LOG_ERROR("%s failed to start up the stack", __func__); Loading Loading
system/bta/sys/bta_sys.h +10 −0 Original line number Diff line number Diff line Loading @@ -173,9 +173,19 @@ enum { }; typedef uint8_t tBTA_SYS_HW_EVT; /* SYS HW state */ enum { BTA_SYS_HW_OFF, BTA_SYS_HW_STARTING, BTA_SYS_HW_ON, BTA_SYS_HW_STOPPING }; typedef uint8_t tBTA_SYS_HW_STATE; /***************************************************************************** * Function declarations ****************************************************************************/ void bta_sys_set_state(tBTA_SYS_HW_STATE value); extern void bta_sys_init(void); extern void bta_sys_free(void); Loading
system/bta/sys/bta_sys_int.h +0 −9 Original line number Diff line number Diff line Loading @@ -32,15 +32,6 @@ * state table ****************************************************************************/ /* SYS HW state */ enum { BTA_SYS_HW_OFF, BTA_SYS_HW_STARTING, BTA_SYS_HW_ON, BTA_SYS_HW_STOPPING }; typedef uint8_t tBTA_SYS_HW_STATE; /* Collision callback */ #define MAX_COLLISION_REG 5 Loading
system/bta/sys/bta_sys_main.cc +0 −10 Original line number Diff line number Diff line Loading @@ -88,10 +88,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { switch (bta_sys_cb.state) { case BTA_SYS_HW_OFF: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_set_state(BTA_SYS_HW_STARTING); bta_sys_hw_api_enable(); break; case BTA_SYS_EVT_STACK_ENABLED_EVT: bta_sys_set_state(BTA_SYS_HW_ON); break; Loading Loading @@ -121,9 +117,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { break; case BTA_SYS_HW_ON: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_hw_api_enable(); break; case BTA_SYS_API_DISABLE_EVT: bta_sys_hw_api_disable(); break; Loading @@ -136,9 +129,6 @@ static void bta_sys_sm_execute(tBTA_SYS_HW_EVT event) { break; case BTA_SYS_HW_STOPPING: switch (event) { case BTA_SYS_API_ENABLE_EVT: bta_sys_set_state(BTA_SYS_HW_STARTING); break; case BTA_SYS_EVT_STACK_ENABLED_EVT: BTA_dm_on_hw_on(); bta_sys_hw_api_disable(); Loading
system/btif/src/stack_manager.cc +3 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ #if (defined BTA_AR_INCLUDED) && (BTA_AR_INCLUDED == TRUE) #include "bta_ar_api.h" #endif #include "bta/sys/bta_sys_int.h" #include "bta_dm_int.h" using bluetooth::common::MessageLoopThread; Loading Loading @@ -225,7 +226,8 @@ static void event_start_up_stack(UNUSED_ATTR void* context) { BTA_dm_init(); bta_dm_enable(bte_dm_evt); send_bta_sys_hw_event(BTA_SYS_API_ENABLE_EVT); bta_sys_set_state(BTA_SYS_HW_STARTING); bta_sys_hw_api_enable(); if (future_await(local_hack_future) != FUTURE_SUCCESS) { LOG_ERROR("%s failed to start up the stack", __func__); Loading