OSDN Git Service

Remove must-always-be-true BTU_BTA_INCLUDED
authorChris Manton <cmanton@google.com>
Wed, 3 Sep 2014 23:40:58 +0000 (16:40 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 16 Mar 2015 23:51:33 +0000 (16:51 -0700)
Change-Id: I7ddfb9d611b7f4a2787e0f4bec4a090cd9efc202

include/bt_target.h
main/bte_init.c
stack/btu/btu_task.c

index 9f78277..0a00345 100644 (file)
@@ -801,11 +801,6 @@ BT_API extern void bte_main_lpm_allow_bt_device_sleep(void);
 #define BTU_STARTUP_DELAY           0
 #endif
 
-/* Whether BTA is included in BTU task. */
-#ifndef BTU_BTA_INCLUDED
-#define BTU_BTA_INCLUDED            TRUE
-#endif
-
 /* Default class of device
 * {SERVICE_CLASS, MAJOR_CLASS, MINOR_CLASS}
 *
index 16df2d2..e57934d 100644 (file)
 #include "bip_api.h"
 #endif
 
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
 #if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
 #include "bta_bi_api.h"
 #endif
-#endif
 
 #if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
 #include "hfp_api.h"
@@ -321,11 +319,9 @@ BT_API void BTE_InitStack(void)
     OBX_Init();
 #if (defined(BIP_INCLUDED) && BIP_INCLUDED == TRUE)
     BIP_Init();
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
 #if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
     BTA_BicInit();
 #endif  /* BTA BI */
-#endif
 #endif  /* BIP */
 
 #if (defined(GOEP_INCLUDED) && GOEP_INCLUDED == TRUE)
index 22766c4..157d0c2 100644 (file)
@@ -119,9 +119,7 @@ extern void avdt_rcv_sync_info (BT_HDR *p_buf); /* this is for hci_test */
 #include "mca_int.h"
 #endif
 
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
 #include "bta_sys.h"
-#endif
 
 #if (BLE_INCLUDED == TRUE)
 #include "gatt_int.h"
@@ -413,9 +411,7 @@ BTU_API void btu_task (void)
     /* Initialize any optional stack components */
     BTE_InitStack();
 
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
     bta_sys_init();
-#endif
 
     /* Initialise platform trace levels at this point as BTE_InitStack() and bta_sys_init()
      * reset the control blocks and preset the trace level with XXX_INITIAL_TRACE_LEVEL
@@ -453,7 +449,6 @@ BTU_API void btu_task (void)
         }
 #endif  // QUICK_TIMER
 
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
         // BTA message queue.
         while (!fixed_queue_is_empty(btu_bta_msg_queue)) {
             p_msg = (BT_HDR *)fixed_queue_dequeue(btu_bta_msg_queue);
@@ -465,7 +460,6 @@ BTU_API void btu_task (void)
             p_tle = (TIMER_LIST_ENT *)fixed_queue_dequeue(btu_bta_alarm_queue);
             btu_bta_alarm_process(p_tle);
         }
-#endif  // BTU_BTA_INCLUDED
 
         while (!fixed_queue_is_empty(btu_oneshot_alarm_queue)) {
             p_tle = (TIMER_LIST_ENT *)fixed_queue_dequeue(btu_oneshot_alarm_queue);
@@ -495,9 +489,7 @@ BTU_API void btu_task (void)
             break;
     }
 
-#if (defined(BTU_BTA_INCLUDED) && BTU_BTA_INCLUDED == TRUE)
     bta_sys_free();
-#endif
 
     btu_free_core();