component/bt: add conditional compilation direvatives to control the source code building of classic bluetooth

This commit is contained in:
wangmengyang
2017-03-17 15:08:47 +08:00
parent b2f52dd22e
commit fda2e89a1e
46 changed files with 188 additions and 277 deletions

View File

@@ -28,6 +28,8 @@
#include "a2d_int.h"
#include "avdt_api.h"
#if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -393,3 +395,4 @@ void A2D_Init(void)
#endif
}
#endif /* #if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE) */

View File

@@ -31,6 +31,8 @@
#include "a2d_sbc.h"
#include "bt_utils.h"
#if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE)
/*************************************************************************************************
* SBC descramble code
* Purpose: to tie the SBC code with BTE/mobile stack code,
@@ -397,3 +399,4 @@ void A2D_ParsSbcMplHdr(UINT8 *p_src, BOOLEAN *p_frag, BOOLEAN *p_start, BOOLEAN
}
}
#endif /* #if (defined(A2D_INCLUDED) && A2D_INCLUDED == TRUE) */

View File

@@ -33,6 +33,8 @@
#include "avct_api.h"
#include "avct_int.h"
#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE)
/* Control block for AVCT */
#if AVCT_DYNAMIC_MEMORY == FALSE
tAVCT_CB avct_cb;
@@ -471,3 +473,4 @@ UINT16 AVCT_MsgReq(UINT8 handle, UINT8 label, UINT8 cr, BT_HDR *p_msg)
return result;
}
#endif /* #if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE) */

View File

@@ -29,6 +29,8 @@
#include "avct_api.h"
#include "avct_int.h"
#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE)
/*******************************************************************************
**
** Function avct_ccb_alloc
@@ -148,3 +150,5 @@ tAVCT_CCB *avct_ccb_by_idx(UINT8 idx)
}
return p_ccb;
}
#endif /* #if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE) */

View File

@@ -31,6 +31,8 @@
#include "l2c_api.h"
#include "l2cdefs.h"
#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE)
/* Configuration flags. */
#define AVCT_L2C_CFG_IND_DONE (1<<0)
#define AVCT_L2C_CFG_CFM_DONE (1<<1)
@@ -434,3 +436,4 @@ void avct_l2c_data_ind_cback(UINT16 lcid, BT_HDR *p_buf)
}
}
#endif /* #if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE) */

View File

@@ -31,6 +31,8 @@
#include "avct_int.h"
#include "gki.h"
#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE)
/*****************************************************************************
** state machine constants and types
*****************************************************************************/
@@ -470,4 +472,4 @@ BOOLEAN avct_lcb_last_ccb(tAVCT_LCB *p_lcb, tAVCT_CCB *p_ccb_last)
}
#endif /* #if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE) */

View File

@@ -31,6 +31,8 @@
#include "gki.h"
#include "btm_api.h"
#if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE)
/* packet header length lookup table */
const UINT8 avct_lcb_pkt_type_len[] = {
AVCT_HDR_LEN_SINGLE,
@@ -732,3 +734,5 @@ void avct_lcb_msg_ind(tAVCT_LCB *p_lcb, tAVCT_LCB_EVT *p_data)
}
}
}
#endif /* #if (defined(AVCT_INCLUDED) && AVCT_INCLUDED == TRUE) */

View File

@@ -35,7 +35,7 @@
#include "l2c_api.h"
#include "l2cdefs.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/*******************************************************************************
**
** Function avdt_ad_type_to_tcid
@@ -643,3 +643,4 @@ void avdt_ad_close_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb)
}
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -33,13 +33,13 @@
#include "btm_api.h"
#include "btu.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/* Control block for AVDT */
#if AVDT_DYNAMIC_MEMORY == FALSE
tAVDT_CB avdt_cb;
#endif
/*******************************************************************************
**
** Function avdt_process_timeout
@@ -1434,3 +1434,5 @@ UINT8 AVDT_SetTraceLevel (UINT8 new_level)
return (avdt_cb.trace_level);
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -33,6 +33,8 @@
#include "gki.h"
#include "btu.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/*****************************************************************************
** state machine constants and types
*****************************************************************************/
@@ -463,3 +465,4 @@ tAVDT_CCB *avdt_ccb_by_idx(UINT8 idx)
return p_ccb;
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -34,6 +34,8 @@
#include "btu.h"
#include "btm_api.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/*******************************************************************************
**
** Function avdt_ccb_clear_ccb
@@ -1131,3 +1133,5 @@ void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data)
(*p_ccb->p_conn_cback)(0, p_ccb->peer_addr, AVDT_CONNECT_IND_EVT, &avdt_ctrl);
}
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -34,6 +34,7 @@
#include "btm_api.h"
#include "btm_int.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/* callback function declarations */
void avdt_l2c_connect_ind_cback(BD_ADDR bd_addr, UINT16 lcid, UINT16 psm, UINT8 id);
@@ -529,3 +530,4 @@ void avdt_l2c_data_ind_cback(UINT16 lcid, BT_HDR *p_buf)
GKI_freebuf(p_buf);
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -36,6 +36,7 @@
#include "gki.h"
#include "btu.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/*****************************************************************************
** constants
*****************************************************************************/
@@ -1899,3 +1900,5 @@ void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL);
}
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -33,6 +33,8 @@
#include "gki.h"
#include "btu.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/*****************************************************************************
** state machine constants and types
*****************************************************************************/
@@ -797,3 +799,4 @@ void avdt_scb_peer_seid_list(tAVDT_MULTI *p_multi)
}
}
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -33,6 +33,8 @@
#include "gki.h"
#include "btu.h"
#if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE)
/* This table is used to lookup the callback event that matches a particular
** state machine API request event. Note that state machine API request
** events are at the beginning of the event list starting at zero, thus
@@ -2174,3 +2176,4 @@ void avdt_scb_queue_frags(tAVDT_SCB *p_scb, UINT8 **pp_data, UINT32 *p_data_len,
}
#endif
#endif /* #if (defined(AVDT_INCLUDED) && AVDT_INCLUDED == TRUE) */

View File

@@ -24,11 +24,13 @@
// #include <assert.h>
#include "bt_trace.h"
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -1167,3 +1169,4 @@ UINT16 AVRC_PassRsp(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p_msg)
return AVRC_NO_RESOURCES;
}
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -16,12 +16,14 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -248,3 +250,4 @@ tAVRC_STS AVRC_BldCommand( tAVRC_COMMAND *p_cmd, BT_HDR **pp_pkt)
}
#endif /* (AVRC_METADATA_INCLUDED == TRUE) */
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -16,13 +16,15 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
#include "bt_utils.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -915,3 +917,4 @@ tAVRC_STS AVRC_BldResponse( UINT8 handle, tAVRC_RESPONSE *p_rsp, BT_HDR **pp_pkt
#endif /* (AVRC_METADATA_INCLUDED == TRUE)*/
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -24,11 +24,12 @@
// #include <assert.h>
#include "bt_target.h"
#include <string.h>
#include "gki.h"
#include "avrc_api.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/******************************************************************************
**
** Function avrc_vendor_msg
@@ -230,5 +231,4 @@ UINT16 AVRC_VendorRsp(UINT8 handle, UINT8 label, tAVRC_MSG_VENDOR *p_msg)
return AVCT_NO_RESOURCES;
}
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -16,13 +16,15 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
#include "bt_utils.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -148,3 +150,5 @@ tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p_result, UINT8 *
#endif /* (AVRC_METADATA_INCLUDED == TRUE) */
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -16,12 +16,14 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_defs.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
/*****************************************************************************
** Global data
*****************************************************************************/
@@ -320,3 +322,4 @@ tAVRC_STS AVRC_ParsCommand (tAVRC_MSG *p_msg, tAVRC_COMMAND *p_result, UINT8 *p_
#endif /* (AVRC_METADATA_INCLUDED == TRUE) */
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -22,11 +22,13 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
#ifndef SDP_AVRCP_1_4
#define SDP_AVRCP_1_4 FALSE
#endif
@@ -350,3 +352,4 @@ void AVRC_Init(void)
#endif
}
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */

View File

@@ -16,11 +16,12 @@
*
******************************************************************************/
#include <string.h>
#include "bt_target.h"
#include "gki.h"
#include "avrc_api.h"
#include "avrc_int.h"
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
#if (AVRC_METADATA_INCLUDED == TRUE)
@@ -237,3 +238,4 @@ BOOLEAN avrc_is_valid_opcode(UINT8 opcode)
#endif /* (AVRC_METADATA_INCLUDED == TRUE) */
#endif /* #if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE) */