示例#1
0
void btu_task_shut_down(UNUSED_ATTR void *context) {
  fixed_queue_unregister_dequeue(btu_bta_msg_queue);
  fixed_queue_unregister_dequeue(btu_hci_msg_queue);
  fixed_queue_unregister_dequeue(btu_general_alarm_queue);
  fixed_queue_unregister_dequeue(btu_oneshot_alarm_queue);
  fixed_queue_unregister_dequeue(btu_l2cap_alarm_queue);

#if ( BT_USE_TRACES==TRUE )
  module_clean_up(get_module(BTE_LOGMSG_MODULE));
#endif

  bta_sys_free();
  btu_free_core();
}
示例#2
0
/******************************************************************************
**
** Function         bte_main_shutdown
**
** Description      BTE MAIN API - Shutdown code for BTE chip/stack
**
** Returns          None
**
******************************************************************************/
void bte_main_shutdown(void)
{
    //data_dispatcher_register_default(hci_layer_get_interface()->event_dispatcher, NULL);
    hci->set_data_queue(NULL);
    fixed_queue_unregister_dequeue(btu_hci_msg_queue);
    fixed_queue_free(btu_hci_msg_queue, NULL);

    btu_hci_msg_queue = NULL;

    /*
        module_clean_up(get_module(STACK_CONFIG_MODULE));

        module_clean_up(get_module(COUNTER_MODULE));
        module_clean_up(get_module(GKI_MODULE));
    */

#if (BLE_INCLUDED == TRUE)
    BTA_VendorCleanup();
#endif
    bte_main_disable();
    gki_clean_up();
}