Remove a bunch of always-false macros
Referenced missing header files, so they wouldn't even
compile if set to true.
diff --git a/include/bt_target.h b/include/bt_target.h
index 744dcac..2143e53 100644
--- a/include/bt_target.h
+++ b/include/bt_target.h
@@ -68,14 +68,6 @@
#define BTA_AG_INCLUDED TRUE
#endif
-#ifndef BTA_BI_INCLUDED
-#define BTA_BI_INCLUDED FALSE
-#endif
-
-#ifndef BTA_SC_INCLUDED
-#define BTA_SC_INCLUDED FALSE
-#endif
-
#ifndef BTA_PAN_INCLUDED
#define BTA_PAN_INCLUDED TRUE
#endif
@@ -1500,21 +1492,6 @@
#define GAP_INCLUDED TRUE
#endif
-/******************************************************************************
-**
-** SPP
-**
-******************************************************************************/
-
-#ifndef SPP_INCLUDED
-#define SPP_INCLUDED FALSE
-#endif
-
-/* The SPP discovery record size. */
-#ifndef SPP_DISC_REC_SIZE
-#define SPP_DISC_REC_SIZE 60
-#endif
-
/* keep the raw data received from SDP server in database. */
#ifndef SDP_RAW_DATA_INCLUDED
#define SDP_RAW_DATA_INCLUDED TRUE
@@ -1527,48 +1504,10 @@
/******************************************************************************
**
-** HSP2, HFP
-**
-******************************************************************************/
-
-#ifndef HSP2_INCLUDED
-#define HSP2_INCLUDED FALSE
-#endif
-
-/* The time in seconds to wait for completion of a partial AT command or response from the peer. */
-#ifndef HSP2_AT_TO_INTERVAL
-#define HSP2_AT_TO_INTERVAL 30
-#endif
-
-#ifndef HSP2_MAX_AT_VAL_LENGTH
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
-#define HSP2_MAX_AT_VAL_LENGTH 310
-#else
-#define HSP2_MAX_AT_VAL_LENGTH 5
-#endif
-#endif
-
-/******************************************************************************
-**
-** HFP
-**
-******************************************************************************/
-
-#ifndef HFP_INCLUDED
-#define HFP_INCLUDED FALSE
-#endif
-
-/******************************************************************************
-**
** HID
**
******************************************************************************/
-/* HID Device Role Included */
-#ifndef HID_DEV_INCLUDED
-#define HID_DEV_INCLUDED FALSE
-#endif
-
#ifndef HID_DEV_PM_INCLUDED
#define HID_DEV_PM_INCLUDED TRUE
#endif
@@ -1629,58 +1568,6 @@
/******************************************************************************
**
-** OPP
-**
-******************************************************************************/
-
-#ifndef OPP_INCLUDED
-#define OPP_INCLUDED FALSE
-#endif
-
-/******************************************************************************
-**
-** BPP Printer
-**
-******************************************************************************/
-#ifndef BPP_INCLUDED
-#define BPP_INCLUDED FALSE
-#endif
-
-#ifndef BPP_SND_INCLUDED
-#define BPP_SND_INCLUDED FALSE
-#endif
-
-/******************************************************************************
-**
-** BIP
-**
-******************************************************************************/
-#ifndef BIP_INCLUDED
-#define BIP_INCLUDED FALSE
-#endif
-
-/******************************************************************************
-**
-** HCRP
-**
-******************************************************************************/
-
-#ifndef HCRP_INCLUDED
-#define HCRP_INCLUDED FALSE
-#endif
-
-/* This is set to enable server. */
-#ifndef HCRP_SERVER_INCLUDED
-#define HCRP_SERVER_INCLUDED FALSE
-#endif
-
-/* This is set to enable client. */
-#ifndef HCRP_CLIENT_INCLUDED
-#define HCRP_CLIENT_INCLUDED FALSE
-#endif
-
-/******************************************************************************
-**
** PAN
**
******************************************************************************/
@@ -1689,16 +1576,6 @@
#define PAN_INCLUDED FALSE
#endif
-/******************************************************************************
-**
-** SAP
-**
-******************************************************************************/
-
-#ifndef SAP_SERVER_INCLUDED
-#define SAP_SERVER_INCLUDED FALSE
-#endif
-
/*************************************************************************
* A2DP Definitions
*/
diff --git a/main/bte_init.c b/main/bte_init.c
index bef7206..94baf36 100644
--- a/main/bte_init.c
+++ b/main/bte_init.c
@@ -47,44 +47,6 @@
#include "gap_api.h"
#endif
-#if (defined(SPP_INCLUDED) && SPP_INCLUDED == TRUE)
-#include "spp_api.h"
-#endif
-
-#if (defined(OPP_INCLUDED) && OPP_INCLUDED == TRUE)
-#include "opp_api.h"
-#endif /* OPP */
-
-#if (defined(BIP_INCLUDED) && BIP_INCLUDED == TRUE)
-#include "bip_api.h"
-#endif
-
-#if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
-#include "bta_bi_api.h"
-#endif
-
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
-#include "hfp_api.h"
-#endif
-
-#if ((defined(HSP2_INCLUDED) && HSP2_INCLUDED == TRUE)) || \
- ((defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE))
-#include "hsp2_api.h"
-#endif
-
-#if (defined(HCRP_INCLUDED) && HCRP_INCLUDED == TRUE)
-#if (defined(HCRP_CLIENT_INCLUDED) && HCRP_CLIENT_INCLUDED == TRUE)
-#include "hcrp_api.h"
-#endif
-#if (defined(HCRP_SERVER_INCLUDED) && HCRP_SERVER_INCLUDED == TRUE)
-#include "hcrpm_api.h"
-#endif
-#endif
-
-#if (defined(BPP_INCLUDED) && BPP_INCLUDED == TRUE)
-#include "bpp_api.h"
-#endif
-
#if (defined(PAN_INCLUDED) && PAN_INCLUDED == TRUE)
#include "pan_api.h"
#endif
@@ -97,19 +59,10 @@
#include "a2d_api.h"
#endif
-
-#if (defined(HID_DEV_INCLUDED) && HID_DEV_INCLUDED == TRUE)
-#include "hidd_api.h"
-#endif
-
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
#include "hidh_api.h"
#endif
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
-#include "sap_api.h"
-#endif /* SAP_SERVER_INCLUDED */
-
#if (defined(MCA_INCLUDED) && MCA_INCLUDED == TRUE)
#include "mca_api.h"
#endif
@@ -121,17 +74,11 @@
#endif
#endif
-// btla-specific ++
/***** BTA Modules ******/
#if BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE
#include "bta_api.h"
#include "bta_sys.h"
-#if BTA_AC_INCLUDED == TRUE
-#include "bta_acs_int.h"
-#include "bta_acc_int.h"
-#endif
-
#if BTA_AG_INCLUDED == TRUE
#include "bta_ag_int.h"
#endif
@@ -142,50 +89,10 @@
#include "bta_dm_int.h"
-#if BTA_DG_INCLUDED == TRUE
-#include "bta_dg_api.h"
-#include "bta_dg_int.h"
-#endif
-
-#if BTA_FT_INCLUDED == TRUE
-#include "bta_ftc_int.h"
-#include "bta_fts_int.h"
-#endif
-
-#if BTA_PBC_INCLUDED == TRUE
-#include "bta_pbc_int.h"
-#endif
-
#if BTA_PBS_INCLUDED == TRUE
#include "bta_pbs_int.h"
#endif
-#if BTA_OP_INCLUDED == TRUE
-#include "bta_opc_int.h"
-#include "bta_ops_int.h"
-#endif
-
-#if BTA_SS_INCLUDED==TRUE
-#include "bta_ss_int.h"
-#endif
-
-#if BTA_CT_INCLUDED==TRUE
-#include "bta_ct_int.h"
-#endif
-
-#if BTA_CG_INCLUDED==TRUE
-#include "bta_cg_int.h"
-#endif
-
-#if BTA_BI_INCLUDED==TRUE
-#include "bta_bic_int.h"
-#include "bta_bis_int.h"
-#endif
-
-#if BTA_PR_INCLUDED==TRUE
-#include "bta_pr_int.h"
-#endif
-
#if BTA_AR_INCLUDED==TRUE
#include "bta_ar_int.h"
#endif
@@ -193,39 +100,15 @@
#include "bta_av_int.h"
#endif
-#if BTA_SC_INCLUDED==TRUE
-#include "bta_sc_int.h"
-#endif
-
-#if BTA_HD_INCLUDED==TRUE
-#include "bta_hd_int.h"
-#endif
-
#if BTA_HH_INCLUDED==TRUE
#include "bta_hh_int.h"
#endif
-#if BTA_FM_INCLUDED==TRUE
-#include "bta_fm_int.h"
-#endif
-
-#if BTA_FMTX_INCLUDED==TRUE
-#include "bta_fmtx_int.h"
-#endif
-
#if BTA_JV_INCLUDED==TRUE
#include "bta_jv_int.h"
tBTA_JV_CB *bta_jv_cb_ptr = NULL;
#endif
-#if BTA_MCE_INCLUDED == TRUE
-#include "bta_mce_int.h"
-#endif
-
-#if BTA_MSE_INCLUDED == TRUE
-#include "bta_mse_int.h"
-#endif
-
#if BTA_HL_INCLUDED == TRUE
#include "bta_hl_int.h"
#endif
@@ -245,7 +128,6 @@
#include "bta_prm_int.h"
#endif /* BTA_INCLUDED */
-// btla-specific --
/*****************************************************************************
** F U N C T I O N S *
@@ -276,37 +158,11 @@
#if (defined(RFCOMM_INCLUDED) && RFCOMM_INCLUDED == TRUE)
RFCOMM_Init();
-#if (defined(SPP_INCLUDED) && SPP_INCLUDED == TRUE)
- SPP_Init();
-#endif /* SPP */
-
-#if (defined(HSP2_INCLUDED) && HSP2_INCLUDED == TRUE)
- HSP2_Init();
-#endif /* HSP2 */
-
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
- HFP_Init();
-#endif /* HFP */
-
/**************************
** OBEX and its profiles **
***************************/
#if (defined(OBX_INCLUDED) && OBX_INCLUDED == TRUE)
OBX_Init();
-#if (defined(BIP_INCLUDED) && BIP_INCLUDED == TRUE)
- BIP_Init();
-#if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
- BTA_BicInit();
-#endif /* BTA BI */
-#endif /* BIP */
-
-#if (defined(OPP_INCLUDED) && OPP_INCLUDED == TRUE)
- OPP_Init();
-#endif
-
-#if (defined(BPP_INCLUDED) && BPP_INCLUDED == TRUE)
- BPP_Init();
-#endif /* BPP */
#endif /* OBX */
@@ -344,34 +200,17 @@
GAP_Init();
#endif /* GAP Included */
-#if (defined(HCRP_INCLUDED) && HCRP_INCLUDED == TRUE)
-#if (defined(HCRP_CLIENT_INCLUDED) && HCRP_CLIENT_INCLUDED == TRUE)
- HCRP_Init();
-#endif
-#if (defined(HCRP_SERVER_INCLUDED) && HCRP_SERVER_INCLUDED == TRUE)
- HCRPM_Init();
-#endif
-#endif /* HCRP Included */
-
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
- SAP_Init();
-#endif /* SAP_SERVER_INCLUDED */
-
-#if (defined(HID_DEV_INCLUDED) && HID_DEV_INCLUDED == TRUE)
- HID_DevInit();
-#endif
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
HID_HostInit();
#endif
#if (defined(MCA_INCLUDED) && MCA_INCLUDED == TRUE)
MCA_Init();
-#endif /* SAP_SERVER_INCLUDED */
+#endif
/****************
** BTA Modules **
*****************/
-// btla-specific ++
#if (BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE)
memset((void*)bta_sys_cb_ptr, 0, sizeof(tBTA_SYS_CB));
memset((void*)bta_dm_cb_ptr, 0, sizeof(tBTA_DM_CB));
@@ -379,75 +218,24 @@
memset((void*)bta_dm_di_cb_ptr, 0, sizeof(tBTA_DM_DI_CB));
memset((void*)bta_prm_cb_ptr, 0, sizeof(tBTA_PRM_CB));
-#if BTA_AC_INCLUDED == TRUE
- memset((void*)bta_acc_cb_ptr, 0, sizeof(tBTA_ACC_CB));
- memset((void*)bta_acs_cb_ptr, 0, sizeof(tBTA_ACS_CB));
-#endif
#if BTA_AG_INCLUDED == TRUE
memset((void*)bta_ag_cb_ptr, 0, sizeof(tBTA_AG_CB));
#endif
#if BTA_HS_INCLUDED == TRUE
memset((void*)bta_hs_cb_ptr, 0, sizeof(tBTA_HS_CB));
#endif
-#if BTA_DG_INCLUDED == TRUE
- memset((void*)bta_dg_cb_ptr, 0, sizeof(tBTA_DG_CB));
-#endif
-#if BTA_FT_INCLUDED==TRUE
- memset((void*)bta_ftc_cb_ptr, 0, sizeof(tBTA_FTC_CB));
- memset((void*)bta_fts_cb_ptr, 0, sizeof(tBTA_FTS_CB));
-#endif
-#if BTA_PBC_INCLUDED==TRUE
- memset((void*)bta_pbc_cb_ptr, 0, sizeof(tBTA_PBC_CB));
-#endif
#if BTA_PBS_INCLUDED==TRUE
memset((void*)bta_pbs_cb_ptr, 0, sizeof(tBTA_PBS_CB));
#endif
-#if BTA_OP_INCLUDED==TRUE
- memset((void*)bta_opc_cb_ptr, 0, sizeof(tBTA_OPC_CB));
- memset((void*)bta_ops_cb_ptr, 0, sizeof(tBTA_OPS_CB));
-#endif
-#if BTA_SS_INCLUDED==TRUE
- memset((void*)bta_ss_cb_ptr, 0, sizeof(tBTA_SS_CB));
-#endif
-#if BTA_CT_INCLUDED==TRUE
- memset((void*)bta_ct_cb_ptr, 0, sizeof(tBTA_CT_CB));
-#endif
-#if BTA_CG_INCLUDED==TRUE
- memset((void*)bta_cg_cb_ptr, 0, sizeof(tBTA_CG_CB));
-#endif
-#if BTA_BI_INCLUDED==TRUE
- memset((void *)bta_bic_cb_ptr, 0, sizeof(tBTA_BIC_CB));
- memset((void *)bta_bis_cb_ptr, 0, sizeof(tBTA_BIS_CB));
-#endif
#if BTA_AR_INCLUDED==TRUE
memset((void *)bta_ar_cb_ptr, 0, sizeof(tBTA_AR_CB));
#endif
#if BTA_AV_INCLUDED==TRUE
memset((void *)bta_av_cb_ptr, 0, sizeof(tBTA_AV_CB));
#endif
-#if BTA_PR_INCLUDED==TRUE
- memset((void *)bta_pr_cb_ptr, 0, sizeof(tBTA_PR_CB));
-#endif
-#if BTA_SC_INCLUDED==TRUE
- memset((void *)bta_sc_cb_ptr, 0, sizeof(tBTA_SC_CB));
-#endif
-#if BTA_HD_INCLUDED==TRUE
- memset((void *)bta_hd_cb_ptr, 0, sizeof(tBTA_HD_CB));
-#endif
#if BTA_HH_INCLUDED==TRUE
memset((void *)bta_hh_cb_ptr, 0, sizeof(tBTA_HH_CB));
#endif
-#if BTA_FM_INCLUDED==TRUE
- memset((void *)bta_fm_cb_ptr, 0, sizeof(tBTA_FM_CB));
-#endif
-#if BTA_FMTX_INCLUDED==TRUE
- memset((void *)bta_fmtx_cb_ptr, 0, sizeof(tBTA_FMTX_CB));
-#endif
-#if 0
-#if BTA_JV_INCLUDED==TRUE
- memset((void *)bta_jv_cb_ptr, 0, sizeof(tBTA_JV_CB));
-#endif
-#endif
#if BTA_HL_INCLUDED==TRUE
memset((void *)bta_hl_cb_ptr, 0, sizeof(tBTA_HL_CB));
#endif
@@ -460,6 +248,5 @@
#endif
#endif /* BTA_INCLUDED == TRUE */
-// btla-specific --
}
diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c
index 16209c5..5105a7d 100644
--- a/main/bte_logmsg.c
+++ b/main/bte_logmsg.c
@@ -55,22 +55,13 @@
#if (A2D_INCLUDED==TRUE)
#include "a2d_api.h"
#endif
-#if (BIP_INCLUDED==TRUE)
-#include "bip_api.h"
-#endif
#if (BNEP_INCLUDED==TRUE)
#include "bnep_api.h"
#endif
-#if (BPP_INCLUDED==TRUE)
-#include "bpp_api.h"
-#endif
#include "btm_api.h"
#if (GAP_INCLUDED==TRUE)
#include "gap_api.h"
#endif
-#if (HCRP_INCLUDED==TRUE)
-#include "hcrp_api.h"
-#endif
#if (PAN_INCLUDED==TRUE)
#include "pan_api.h"
#endif
@@ -179,28 +170,16 @@
#if (A2D_INCLUDED==TRUE)
{BTTRC_ID_STK_A2D, BTTRC_ID_STK_A2D, A2D_SetTraceLevel, "TRC_A2D", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (BIP_INCLUDED==TRUE)
- {BTTRC_ID_STK_BIP, BTTRC_ID_STK_BIP, BIP_SetTraceLevel, "TRC_BIP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
#if (BNEP_INCLUDED==TRUE)
{BTTRC_ID_STK_BNEP, BTTRC_ID_STK_BNEP, BNEP_SetTraceLevel, "TRC_BNEP", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (BPP_INCLUDED==TRUE)
- {BTTRC_ID_STK_BPP, BTTRC_ID_STK_BPP, BPP_SetTraceLevel, "TRC_BPP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
{BTTRC_ID_STK_BTM_ACL, BTTRC_ID_STK_BTM_SEC, BTM_SetTraceLevel, "TRC_BTM", DEFAULT_CONF_TRACE_LEVEL},
#if (GAP_INCLUDED==TRUE)
{BTTRC_ID_STK_GAP, BTTRC_ID_STK_GAP, GAP_SetTraceLevel, "TRC_GAP", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (HCRP_INCLUDED==TRUE)
- {BTTRC_ID_STK_HCRP, BTTRC_ID_STK_HCRP, HCRP_SetTraceLevel, "TRC_HCRP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
#if (PAN_INCLUDED==TRUE)
{BTTRC_ID_STK_PAN, BTTRC_ID_STK_PAN, PAN_SetTraceLevel, "TRC_PAN", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (SAP_SERVER_INCLUDED==TRUE)
- {BTTRC_ID_STK_SAP, BTTRC_ID_STK_SAP, NULL, "TRC_SAP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
{BTTRC_ID_STK_SDP, BTTRC_ID_STK_SDP, SDP_SetTraceLevel, "TRC_SDP", DEFAULT_CONF_TRACE_LEVEL},
#if (BLE_INCLUDED==TRUE)
{BTTRC_ID_STK_GATT, BTTRC_ID_STK_GATT, GATT_SetTraceLevel, "TRC_GATT", DEFAULT_CONF_TRACE_LEVEL},
diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c
index e63a6ec..1fb4ced 100644
--- a/stack/btu/btu_hcif.c
+++ b/stack/btu/btu_hcif.c
@@ -132,11 +132,6 @@
static void btu_hcif_ssr_evt (UINT8 *p, UINT16 evt_len);
#endif /* BTM_SSR_INCLUDED == TRUE */
- #if (HID_DEV_INCLUDED == TRUE) && (HID_DEV_PM_INCLUDED == TRUE)
-extern void hidd_pm_proc_mode_change( UINT8 hci_status, UINT8 mode, UINT16 interval );
- #endif
-
-
#if BLE_INCLUDED == TRUE
static void btu_ble_ll_conn_complete_evt (UINT8 *p, UINT16 evt_len);
static void btu_ble_process_adv_pkt (UINT8 *p);
diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c
index 745136e..b9d4b16 100644
--- a/stack/btu/btu_task.c
+++ b/stack/btu/btu_task.c
@@ -64,10 +64,6 @@
#include "bip_int.h"
#endif /* BIP */
-#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
-#include "bpp_int.h"
-#endif /* BPP */
-
#endif /* OBX */
/* BTE application task */
@@ -83,14 +79,6 @@
#include "pan_int.h"
#endif
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
-#include "sap_int.h"
-#endif
-
-#if (defined(HID_DEV_INCLUDED) && HID_DEV_INCLUDED == TRUE )
-#include "hidd_int.h"
-#endif
-
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE )
#include "hidh_int.h"
#endif
@@ -291,26 +279,8 @@
GKI_freebuf (p_msg);
break;
#endif /* BIP */
-#if (BPP_SND_INCLUDED == TRUE || BPP_INCLUDED == TRUE)
- case BT_EVT_TO_BPP_PR_CMDS:
- bpp_pr_proc_event(p_msg);
- GKI_freebuf (p_msg);
- break;
- case BT_EVT_TO_BPP_SND_CMDS:
- bpp_snd_proc_event(p_msg);
- GKI_freebuf (p_msg);
- break;
-
-#endif /* BPP */
-
#endif /* OBX */
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
- case BT_EVT_TO_BTU_SAP :
- sap_proc_btu_event(p_msg);
- GKI_freebuf (p_msg);
- break;
-#endif /* SAP */
// NOTE: The timer calls below may not be sent by HCI.
case BT_EVT_TO_START_TIMER :
/* Start free running 1 second timer for list management */
@@ -544,12 +514,6 @@
#endif
#endif
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
- case BTU_TTYPE_SAP_TO:
- sap_process_timeout(p_tle);
- break;
-#endif
-
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
case BTU_TTYPE_HID_HOST_REPAGE_TO :
hidh_proc_repage_timeout(p_tle);