diff options
author | Andre Eisenbach <andre@broadcom.com> | 2012-09-18 01:35:44 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-09-18 16:26:28 -0700 |
commit | 6ef101187774e30ddba6b46bbedef549a42196ad (patch) | |
tree | f36eb347f03083671640fbc750171e3b951e0082 /stack/include | |
parent | f80d3d045eab5f002be4b5e8a3d2d376fdf7581a (diff) | |
download | external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.zip external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.gz external_bluetooth_bluedroid-6ef101187774e30ddba6b46bbedef549a42196ad.tar.bz2 |
Initual Bluetooth open source release
First release under Apache source license with updated header files
and whitespace cleanups. Also fixed file permission to remove executable
bit from source files.
Change-Id: I7155903edfc2f491c1cbbd0db108f207852caaa0
Diffstat (limited to 'stack/include')
36 files changed, 1351 insertions, 976 deletions
diff --git a/stack/include/a2d_api.h b/stack/include/a2d_api.h index 6bb7f0b..f21ba6c 100644 --- a/stack/include/a2d_api.h +++ b/stack/include/a2d_api.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: a2d_api.h -** -** Description:Interface to A2DP Application Programming Interface -** -** Copyright (c) 2000-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2000-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * nterface to A2DP Application Programming Interface + * + ******************************************************************************/ #ifndef A2D_API_H #define A2D_API_H #include "sdp_api.h" @@ -44,7 +57,7 @@ #define A2D_INVALID_PARAMS 0x0C /* bad parameters */ #define A2D_WRONG_CODEC 0x0D /* wrong codec info */ #define A2D_BAD_CODEC_TYPE 0xC1 /* Media Codec Type is not valid */ -#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */ +#define A2D_NS_CODEC_TYPE 0xC2 /* Media Codec Type is not supported */ #define A2D_BAD_SAMP_FREQ 0xC3 /* Sampling Frequency is not valid or multiple values have been selected */ #define A2D_NS_SAMP_FREQ 0xC4 /* Sampling Frequency is not supported */ #define A2D_BAD_CH_MODE 0xC5 /* Channel Mode is not valid or multiple values have been selected */ @@ -67,7 +80,7 @@ #define A2D_BAD_OBJ_TYPE 0xD6 /* Either 1) Object type is not valid (b3-b0) or 2) None or multiple values have been selected for Object Type */ #define A2D_NS_OBJ_TYPE 0xD7 /* Object type is not supported */ #define A2D_BAD_CHANNEL 0xD8 /* None or multiple values have been selected for Channels */ -#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */ +#define A2D_NS_CHANNEL 0xD9 /* Channels is not supported */ #define A2D_BAD_BLOCK_LEN 0xDD /* None or multiple values have been selected for Block Length */ #define A2D_BAD_CP_TYPE 0xE0 /* The requested CP Type is not supported. */ #define A2D_BAD_CP_FORMAT 0xE1 /* The format of Content Protection Service Capability/Content Protection Scheme Dependent Data is not correct. */ @@ -175,7 +188,7 @@ A2D_API extern tA2D_STATUS A2D_AddRecord(UINT16 service_uuid, char *p_service_na ** ** p_db: Pointer to the information to initialize ** the discovery database. -** +** ** p_cback: Pointer to the A2D_FindService() ** callback function. ** diff --git a/stack/include/a2d_sbc.h b/stack/include/a2d_sbc.h index a80639b..dad0b8b 100644 --- a/stack/include/a2d_sbc.h +++ b/stack/include/a2d_sbc.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: a2d_sbc.h -** -** Description:Interface to low complexity subband codec (SBC) -** -** Copyright (c) 2000-2004, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2000-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * nterface to low complexity subband codec (SBC) + * + ******************************************************************************/ #ifndef A2D_SBC_H #define A2D_SBC_H diff --git a/stack/include/avct_api.h b/stack/include/avct_api.h index b4e819b..2880011 100644 --- a/stack/include/avct_api.h +++ b/stack/include/avct_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: avct_api.h -** -** Description: This interface file contains the interface to the Audio -** Video Control Transport Protocol (AVCTP). -** -** Copyright (c) 2003-2008, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2003-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This interface file contains the interface to the Audio Video Control + * Transport Protocol (AVCTP). + * + ******************************************************************************/ #ifndef AVCT_API_H #define AVCT_API_H @@ -120,7 +133,7 @@ extern "C" ** prepares the protocol stack for its use. This function ** must be called once by the system or platform using AVCTP ** before the other functions of the API an be used. -** +** ** ** Returns void ** @@ -136,7 +149,7 @@ AVCT_API extern void AVCT_Register(UINT16 mtu, UINT16 mtu_br, UINT8 sec_mask); ** application in the system. Before this function can be ** called, all connections must be removed with ** AVCT_RemoveConn(). -** +** ** ** Returns void ** @@ -152,9 +165,9 @@ AVCT_API extern void AVCT_Deregister(void); ** the p_cc->role parameter. When this function is called to ** create an initiator connection, an AVCTP connection to ** the peer device is initiated if one does not already exist. -** If an acceptor connection is created, the connection waits +** If an acceptor connection is created, the connection waits ** passively for an incoming AVCTP connection from a peer device. -** +** ** ** Returns AVCT_SUCCESS if successful, otherwise error. ** @@ -170,7 +183,7 @@ AVCT_API extern UINT16 AVCT_CreateConn(UINT8 *p_handle, tAVCT_CC *p_cc, ** the application is no longer using a connection. If this ** is the last connection to a peer the L2CAP channel for AVCTP ** will be closed. -** +** ** ** Returns AVCT_SUCCESS if successful, otherwise error. ** @@ -186,9 +199,9 @@ AVCT_API extern UINT16 AVCT_RemoveConn(UINT8 handle); ** the p_cc->role parameter. When this function is called to ** create an initiator connection, an AVCTP connection to ** the peer device is initiated if one does not already exist. -** If an acceptor connection is created, the connection waits +** If an acceptor connection is created, the connection waits ** passively for an incoming AVCTP connection from a peer device. -** +** ** ** Returns AVCT_SUCCESS if successful, otherwise error. ** @@ -203,7 +216,7 @@ AVCT_API extern UINT16 AVCT_CreateBrowse(UINT8 handle, UINT8 role); ** the application is no longer using a connection. If this ** is the last connection to a peer the L2CAP channel for AVCTP ** will be closed. -** +** ** ** Returns AVCT_SUCCESS if successful, otherwise error. ** @@ -214,7 +227,7 @@ AVCT_API extern UINT16 AVCT_RemoveBrowse(UINT8 handle); ** ** Function AVCT_GetBrowseMtu ** -** Description Get the peer_mtu for the AVCTP Browse channel of the given +** Description Get the peer_mtu for the AVCTP Browse channel of the given ** connection. ** ** Returns the peer browsing channel MTU. @@ -226,7 +239,7 @@ AVCT_API extern UINT16 AVCT_GetBrowseMtu (UINT8 handle); ** ** Function AVCT_GetPeerMtu ** -** Description Get the peer_mtu for the AVCTP channel of the given +** Description Get the peer_mtu for the AVCTP channel of the given ** connection. ** ** Returns the peer MTU size. diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h index 317386e..0a9b7f8 100644 --- a/stack/include/avdt_api.h +++ b/stack/include/avdt_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: avdt_api.h -** -** Description: This interface file contains the interface to the Audio -** Video Distribution Transport Protocol (AVDTP). -** -** Copyright (c) 2002-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2002-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This interface file contains the interface to the Audio Video + * Distribution Transport Protocol (AVDTP). + * + ******************************************************************************/ #ifndef AVDT_API_H #define AVDT_API_H @@ -57,7 +70,7 @@ /* The marker bit is used by the application to mark significant events such ** as frame boundaries in the data stream. This constant is used to check or ** set the marker bit in the m_pt parameter of an AVDT_WriteReq() -** or AVDT_DATA_IND_EVT. +** or AVDT_DATA_IND_EVT. */ #define AVDT_MARKER_SET 0x80 @@ -273,7 +286,7 @@ typedef struct { } tAVDT_EVT_HDR; /* This data structure is associated with the AVDT_GETCAP_CFM_EVT, -** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT. +** AVDT_RECONFIG_IND_EVT, and AVDT_RECONFIG_CFM_EVT. */ typedef struct { tAVDT_EVT_HDR hdr; /* Event header */ @@ -365,7 +378,7 @@ typedef void (tAVDT_MEDIA_CBACK)(UINT8 handle, UINT8 *p_payload, UINT32 payload_ #if AVDT_REPORTING == TRUE /* This is the report callback function. It is executed when AVDTP has a reporting -** packet ready for the application. This function is required for streams +** packet ready for the application. This function is required for streams ** created with AVDT_PSC_REPORT. */ typedef void (tAVDT_REPORT_CBACK)(UINT8 handle, AVDT_REPORT_TYPE type, @@ -412,7 +425,7 @@ extern "C" ** prepares the protocol stack for its use. This function ** must be called once by the system or platform using AVDTP ** before the other functions of the API an be used. -** +** ** ** Returns void ** @@ -427,7 +440,7 @@ AVDT_API extern void AVDT_Register(tAVDT_REG *p_reg, tAVDT_CTRL_CBACK *p_cback); ** It is called when AVDTP is no longer being used by any ** application in the system. Before this function can be ** called, all streams must be removed with AVDT_RemoveStream(). -** +** ** ** Returns void ** @@ -443,7 +456,7 @@ AVDT_API extern void AVDT_Deregister(void); ** this endpoint and an endpoint on a peer device. In ** addition, a peer device can discover, get the capabilities, ** and connect to this endpoint. -** +** ** ** Returns AVDT_SUCCESS if successful, otherwise error. ** @@ -459,7 +472,7 @@ AVDT_API extern UINT16 AVDT_CreateStream(UINT8 *p_handle, tAVDT_CS *p_cs); ** If this function is called when the endpoint is connected ** the connection is closed and then the stream endpoint ** is removed. -** +** ** ** Returns AVDT_SUCCESS if successful, otherwise error. ** @@ -476,7 +489,7 @@ AVDT_API extern UINT16 AVDT_RemoveStream(UINT8 handle); ** that AVDTP discovery is unrelated to SDP discovery). ** This function can be called at any time regardless of whether ** there is an AVDTP connection to the peer device. -** +** ** When discovery is complete, an AVDT_DISCOVER_CFM_EVT ** is sent to the application via its callback function. ** The application must not call AVDT_GetCapReq() or @@ -505,7 +518,7 @@ AVDT_API extern UINT16 AVDT_DiscoverReq(BD_ADDR bd_addr, tAVDT_SEP_INFO *p_sep_i ** capabilities of a stream endpoint on the peer device. ** This function can be called at any time regardless of ** whether there is an AVDTP connection to the peer device. -** +** ** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is ** sent to the application via its callback function. The ** application must not call AVDT_GetCapReq() or @@ -532,7 +545,7 @@ AVDT_API extern UINT16 AVDT_GetCapReq(BD_ADDR bd_addr, UINT8 seid, tAVDT_CFG *p_ ** capabilities of a stream endpoint on the peer device. ** This function can be called at any time regardless of ** whether there is an AVDTP connection to the peer device. -** +** ** When the procedure is complete, an AVDT_GETCAP_CFM_EVT is ** sent to the application via its callback function. The ** application must not call AVDT_GetCapReq() or @@ -832,10 +845,10 @@ AVDT_API extern UINT16 AVDT_WriteDataReq(UINT8 handle, UINT8 *p_data, UINT32 dat ** buffer if argument p_buf is NULL. This function can only ** be called if the stream is a SNK. ** -** AVDTP uses this buffer to reassemble fragmented media packets. +** AVDTP uses this buffer to reassemble fragmented media packets. ** When AVDTP receives a complete media packet, it calls the ** p_media_cback assigned by AVDT_CreateStream(). -** This function can be called during callback to assign a +** This function can be called during callback to assign a ** different buffer for next media packet or can leave the current ** buffer for next packet. ** @@ -848,11 +861,11 @@ AVDT_API extern UINT16 AVDT_SetMediaBuf(UINT8 handle, UINT8 *p_buf, UINT32 buf_l ** ** Function AVDT_SendReport ** -** Description -** +** Description +** ** ** -** Returns +** Returns ** *******************************************************************************/ AVDT_API extern UINT16 AVDT_SendReport(UINT8 handle, AVDT_REPORT_TYPE type, diff --git a/stack/include/avdtc_api.h b/stack/include/avdtc_api.h index 3b43221..14a1a21 100644 --- a/stack/include/avdtc_api.h +++ b/stack/include/avdtc_api.h @@ -1,17 +1,29 @@ -/***************************************************************************** -** -** Name: avdt_capi.h -** -** Description: This interface file contains the interface AVDTP -** conformance API. These additional API functions and -** callback events are provided for conformance testing -** purposes only. They are not intended to be used by -** an application. -** -** Copyright (c) 2002-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2002-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This interface file contains the interface AVDTP conformance API. These + * additional API functions and callback events are provided for + * conformance testing purposes only. They are not intended to be used by + * an application. + * + ******************************************************************************/ #ifndef AVDT_CAPI_H #define AVDT_CAPI_H @@ -60,7 +72,7 @@ extern "C" ** Description This function is called to begin using the conformance API. ** It must be called after AVDT_Register() and before any ** other API or conformance API functions are called. -** +** ** Returns void ** *******************************************************************************/ @@ -71,7 +83,7 @@ AVDT_API extern void AVDTC_Init(tAVDTC_CTRL_CBACK *p_cback); ** Function AVDTC_DiscoverRsp ** ** Description Send a discover response. -** +** ** Returns void ** *******************************************************************************/ @@ -82,7 +94,7 @@ AVDT_API extern void AVDTC_DiscoverRsp(BD_ADDR bd_addr, UINT8 label, ** ** Function AVDTC_GetCapRsp ** -** Description Send a get capabilities response. +** Description Send a get capabilities response. ** ** Returns void ** @@ -93,7 +105,7 @@ AVDT_API extern void AVDTC_GetCapRsp(BD_ADDR bd_addr, UINT8 label, tAVDT_CFG *p_ ** ** Function AVDTC_GetAllCapRsp ** -** Description Send a get all capabilities response. +** Description Send a get all capabilities response. ** ** Returns void ** @@ -116,7 +128,7 @@ AVDT_API extern void AVDTC_GetConfigReq(UINT8 handle); ** Function AVDTC_GetConfigRsp ** ** Description Send a get configuration response. -** +** ** Returns void ** *******************************************************************************/ @@ -127,7 +139,7 @@ AVDT_API extern void AVDTC_GetConfigRsp(UINT8 handle, UINT8 label, tAVDT_CFG *p_ ** Function AVDTC_OpenReq ** ** Description Send an open request. -** +** ** Returns void ** *******************************************************************************/ @@ -149,7 +161,7 @@ AVDT_API extern void AVDTC_OpenRsp(UINT8 handle, UINT8 label); ** Function AVDTC_StartRsp ** ** Description Send a start response. -** +** ** Returns void ** *******************************************************************************/ @@ -160,7 +172,7 @@ AVDT_API extern void AVDTC_StartRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 l ** Function AVDTC_CloseRsp ** ** Description Send a close response. -** +** ** Returns void ** *******************************************************************************/ @@ -182,7 +194,7 @@ AVDT_API extern void AVDTC_SuspendRsp(UINT8 *p_handles, UINT8 num_handles, UINT8 ** Function AVDTC_AbortReq ** ** Description Send an abort request. -** +** ** Returns void ** *******************************************************************************/ @@ -193,7 +205,7 @@ AVDT_API extern void AVDTC_AbortReq(UINT8 handle); ** Function AVDTC_AbortRsp ** ** Description Send an abort response. -** +** ** Returns void ** *******************************************************************************/ @@ -208,7 +220,7 @@ AVDT_API extern void AVDTC_AbortRsp(UINT8 handle, UINT8 label); ** Returns void ** *******************************************************************************/ -AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label, +AVDT_API extern void AVDTC_Rej(UINT8 handle, BD_ADDR bd_addr, UINT8 cmd, UINT8 label, UINT8 err_code, UINT8 err_param); #ifdef __cplusplus diff --git a/stack/include/avrc_api.h b/stack/include/avrc_api.h index d7e8ee4..1f4bb7f 100644 --- a/stack/include/avrc_api.h +++ b/stack/include/avrc_api.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: avrc_api.h -** -** Description:Interface to AVRCP Application Programming Interface -** -** Copyright (c) 2006-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2006-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * nterface to AVRCP Application Programming Interface + * + ******************************************************************************/ #ifndef AVRC_API_H #define AVRC_API_H #include "bt_target.h" @@ -48,7 +61,7 @@ * This event can result from a call to AVRC_Close() or when the peer closes * the connection. It is also sent when a connection attempted through * AVRC_Open() fails. */ -#define AVRC_CLOSE_IND_EVT 1 +#define AVRC_CLOSE_IND_EVT 1 /* AVRC_CONG_IND_EVT event indicates that AVCTP is congested and cannot send * any more messages. */ @@ -56,8 +69,8 @@ /* AVRC_UNCONG_IND_EVT event indicates that AVCTP is uncongested and ready to * send messages. */ -#define AVRC_UNCONG_IND_EVT 3 - +#define AVRC_UNCONG_IND_EVT 3 + /* AVRC_BROWSE_OPEN_IND_EVT event is sent when the browse channel is successfully opened. * This eventis sent in response to an AVRC_Open() or AVRC_OpenBrowse() . */ #define AVRC_BROWSE_OPEN_IND_EVT 4 @@ -66,7 +79,7 @@ * This event can result from a call to AVRC_Close(), AVRC_CloseBrowse() or when the peer closes * the connection. It is also sent when a connection attempted through * AVRC_OpenBrowse() fails. */ -#define AVRC_BROWSE_CLOSE_IND_EVT 5 +#define AVRC_BROWSE_CLOSE_IND_EVT 5 /* AVRC_BROWSE_CONG_IND_EVT event indicates that AVCTP browse channel is congested and cannot send * any more messages. */ @@ -74,7 +87,7 @@ /* AVRC_BROWSE_UNCONG_IND_EVT event indicates that AVCTP browse channel is uncongested and ready to * send messages. */ -#define AVRC_BROWSE_UNCONG_IND_EVT 7 +#define AVRC_BROWSE_UNCONG_IND_EVT 7 /* Supported categories */ #define AVRC_SUPF_CT_CAT1 0x0001 /* Category 1 */ @@ -123,7 +136,7 @@ typedef struct * to remain after the callback function exits. */ typedef void (tAVRC_FIND_CBACK) (UINT16 status); - + /* This is the control callback function. This function passes events * listed in Table 20 to the application. */ typedef void (tAVRC_CTRL_CBACK) (UINT8 handle, UINT8 event, UINT16 result, @@ -161,7 +174,7 @@ extern "C" ** Function AVRC_AddRecord ** ** Description This function is called to build an AVRCP SDP record. -** Prior to calling this function the application must +** Prior to calling this function the application must ** call SDP_CreateRecord() to create an SDP record. ** ** Input Parameters: @@ -197,7 +210,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name, ** Description This function is called by the application to perform service ** discovery and retrieve AVRCP SDP record information from a ** peer device. Information is returned for the first service -** record found on the server that matches the service UUID. +** record found on the server that matches the service UUID. ** The callback function will be executed when service discovery ** is complete. There can only be one outstanding call to ** AVRC_FindService() at a time; the application must wait for @@ -215,7 +228,7 @@ AVRC_API extern UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name, ** bd_addr: BD address of the peer device. ** ** p_db: SDP discovery database parameters. -** +** ** p_cback: Pointer to the callback function. ** ** Output Parameters: @@ -234,13 +247,13 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr, ** ** Function AVRC_Open ** -** Description This function is called to open a connection to AVCTP. +** Description This function is called to open a connection to AVCTP. ** The connection can be either an initiator or acceptor, as -** determined by the p_ccb->stream parameter. +** determined by the p_ccb->stream parameter. ** The connection can be a target, a controller or for both role, -** as determined by the p_ccb->control parameter. +** as determined by the p_ccb->control parameter. ** By definition, a target connection is an acceptor connection -** that waits for an incoming AVCTP connection from the peer. +** that waits for an incoming AVCTP connection from the peer. ** The connection remains available to the application until ** the application closes it by calling AVRC_Close(). The ** application does not need to reopen the connection after an @@ -252,7 +265,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr, ** p_ccb->p_ctrl_cback: Pointer to control callback function. ** ** p_ccb->p_msg_cback: Pointer to message callback function. -** +** ** p_ccb->conn: AVCTP connection role. This is set to ** AVCTP_INT for initiator connections and AVCTP_ACP ** for acceptor connections. @@ -267,7 +280,7 @@ AVRC_API extern UINT16 AVRC_FindService(UINT16 service_uuid, BD_ADDR bd_addr, ** connections it can be set to NULL. ** ** Output Parameters: -** p_handle: Pointer to handle. This parameter is only +** p_handle: Pointer to handle. This parameter is only ** valid if AVRC_SUCCESS is returned. ** ** Returns AVRC_SUCCESS if successful. @@ -302,9 +315,9 @@ AVRC_API extern UINT16 AVRC_Close(UINT8 handle); ** ** Function AVRC_OpenBrowse ** -** Description This function is called to open a browsing connection to AVCTP. +** Description This function is called to open a browsing connection to AVCTP. ** The connection can be either an initiator or acceptor, as -** determined by the conn_role. +** determined by the conn_role. ** The handle is returned by a previous call to AVRC_Open. ** ** Returns AVRC_SUCCESS if successful. @@ -334,10 +347,10 @@ AVRC_API extern UINT16 AVRC_CloseBrowse(UINT8 handle); ** ** Description This function is used to send the AVRCP byte stream in p_pkt ** down to AVCTP. -** +** ** It is expected that p_pkt->offset is at least AVCT_MSG_OFFSET ** p_pkt->layer_specific is AVCT_DATA_CTRL or AVCT_DATA_BROWSE -** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING +** p_pkt->event is AVRC_OP_VENDOR, AVRC_OP_PASS_THRU or AVRC_OP_BROWSING ** The above BT_HDR settings are set by the AVRC_Bld* functions. ** ** Returns AVRC_SUCCESS if successful. @@ -411,7 +424,7 @@ AVRC_API extern UINT16 AVRC_SubCmd(UINT8 handle, UINT8 label, UINT8 page); ** ** label: Transaction label. ** -** p_msg: Pointer to PASS THROUGH message structure. +** p_msg: Pointer to PASS THROUGH message structure. ** ** Output Parameters: ** None. @@ -427,7 +440,7 @@ AVRC_API extern UINT16 AVRC_PassCmd(UINT8 handle, UINT8 label, tAVRC_MSG_PASS *p ** Function AVRC_PassRsp ** ** Description Send a PASS THROUGH response to the peer device. This -** function can only be called for target role connections. +** function can only be called for target role connections. ** This function must be called when a PASS THROUGH command ** message is received from the peer through the ** tAVRC_MSG_CBACK callback function. @@ -568,7 +581,7 @@ AVRC_API extern tAVRC_STS AVRC_ParsResponse (tAVRC_MSG *p_msg, tAVRC_RESPONSE *p ** ** Function AVRC_BldCommand ** -** Description This function builds the given AVRCP command to the given +** Description This function builds the given AVRCP command to the given ** GKI buffer ** ** Returns AVRC_STS_NO_ERROR, if the command is built successfully @@ -581,7 +594,7 @@ AVRC_API extern tAVRC_STS AVRC_BldCommand( tAVRC_COMMAND *p_cmd, BT_HDR **pp_pkt ** ** Function AVRC_BldResponse ** -** Description This function builds the given AVRCP response to the given +** Description This function builds the given AVRCP response to the given ** GKI buffer ** ** Returns AVRC_STS_NO_ERROR, if the response is built successfully @@ -607,10 +620,10 @@ AVRC_API extern BOOLEAN AVRC_IsValidAvcType(UINT8 pdu_id, UINT8 avc_type); ** Function AVRC_IsValidPlayerAttr ** ** Description Check if the given attrib value is a valid one -** +** ** ** Returns returns TRUE if it is valid -** +** *******************************************************************************/ AVRC_API extern BOOLEAN AVRC_IsValidPlayerAttr(UINT8 attr); diff --git a/stack/include/avrc_defs.h b/stack/include/avrc_defs.h index 3f82948..16ba057 100644 --- a/stack/include/avrc_defs.h +++ b/stack/include/avrc_defs.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: avrc_defs.h -** -** Description: AVRCP definition and data types -** -** Copyright (c) 2006-2008, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2006-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * AVRCP definition and data types + * + ******************************************************************************/ #ifndef _AVRC_DEFS_H #define _AVRC_DEFS_H @@ -164,7 +177,7 @@ ** Metadata transfer definitions *****************************************************************************/ -/* Define the Metadata Packet types +/* Define the Metadata Packet types */ #define AVRC_PKT_SINGLE 0 #define AVRC_PKT_START 1 @@ -190,15 +203,15 @@ #define AVRC_PDU_ABORT_CONTINUATION_RSP 0x41 /* added in 1.4 */ #define AVRC_PDU_SET_ABSOLUTE_VOLUME 0x50 -#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60 -#define AVRC_PDU_SET_BROWSED_PLAYER 0x70 -#define AVRC_PDU_GET_FOLDER_ITEMS 0x71 -#define AVRC_PDU_CHANGE_PATH 0x72 -#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73 -#define AVRC_PDU_PLAY_ITEM 0x74 -#define AVRC_PDU_SEARCH 0x80 -#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90 -#define AVRC_PDU_GENERAL_REJECT 0xA0 +#define AVRC_PDU_SET_ADDRESSED_PLAYER 0x60 +#define AVRC_PDU_SET_BROWSED_PLAYER 0x70 +#define AVRC_PDU_GET_FOLDER_ITEMS 0x71 +#define AVRC_PDU_CHANGE_PATH 0x72 +#define AVRC_PDU_GET_ITEM_ATTRIBUTES 0x73 +#define AVRC_PDU_PLAY_ITEM 0x74 +#define AVRC_PDU_SEARCH 0x80 +#define AVRC_PDU_ADD_TO_NOW_PLAYING 0x90 +#define AVRC_PDU_GENERAL_REJECT 0xA0 /* Define the vendor unique id carried in the pass through data */ @@ -346,7 +359,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE; #define AVRC_ITEM_MEDIA 0x03 #define AVRC_SCOPE_PLAYER_LIST 0x00 /* Media Player Item - Contains all available media players */ -#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item +#define AVRC_SCOPE_FILE_SYSTEM 0x01 /* Folder Item, Media Element Item - The virtual filesystem containing the media content of the browsed player */ #define AVRC_SCOPE_SEARCH 0x02 /* Media Element Item The results of a search operation on the browsed player */ #define AVRC_SCOPE_NOW_PLAYING 0x03 /* Media Element Item The Now Playing list (or queue) of the addressed player */ @@ -381,7 +394,7 @@ typedef UINT8 tAVRC_SYSTEMSTATE; #define AVRC_DIR_UP 0x00 /* Folder Up */ #define AVRC_DIR_DOWN 0x01 /* Folder Down */ - + #define AVRC_UID_SIZE 8 typedef UINT8 tAVRC_UID[AVRC_UID_SIZE]; @@ -741,7 +754,7 @@ typedef UINT8 tAVRC_UID[AVRC_UID_SIZE]; /* This structure contains the header parameters of an AV/C message. */ -typedef struct +typedef struct { UINT8 ctype; /* Command type. */ UINT8 subunit_type; /* Subunit type. */ @@ -766,7 +779,7 @@ typedef struct tAVRC_HDR hdr; /* Message header. */ UINT8 subunit_type[AVRC_SUB_TYPE_LEN]; /* Array containing subunit type values. */ - BOOLEAN panel; /* TRUE if the panel subunit type is in the + BOOLEAN panel; /* TRUE if the panel subunit type is in the * subunit_type array, FALSE otherwise. */ UINT8 page; /* Specifies which part of the subunit type table is * returned. For AVRCP it is typically zero. @@ -826,7 +839,7 @@ typedef union #define AVRC_IS_VALID_CAP_ID(a) (((a == AVRC_CAP_COMPANY_ID) || (a == AVRC_CAP_EVENTS_SUPPORTED)) ? TRUE : FALSE) #define AVRC_IS_VALID_EVENT_ID(a) (((a >= AVRC_EVT_PLAY_STATUS_CHANGE) && \ - (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE) + (a <= AVRC_EVT_APP_SETTING_CHANGE)) ? TRUE : FALSE) #define AVRC_IS_VALID_ATTRIBUTE(a) (((((a > 0) && a <= AVRC_PLAYER_SETTING_SCAN)) || \ ((a >= AVRC_PLAYER_SETTING_LOW_MENU_EXT) && \ @@ -834,7 +847,7 @@ typedef union #define AVRC_IS_VALID_MEDIA_ATTRIBUTE(a) ((a >= AVRC_MEDIA_ATTR_ID_TITLE) && \ - (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE) + (a <= AVRC_MEDIA_ATTR_ID_PLAYING_TIME) ? TRUE : FALSE) #define AVRC_IS_VALID_BATTERY_STATUS(a) ((a <= AVRC_BATTERY_STATUS_FULL_CHARGE) ? TRUE : FALSE) @@ -902,13 +915,13 @@ typedef UINT8 tAVRC_FEATURE_MASK[AVRC_FEATURE_MASK_SIZE]; typedef struct { - UINT16 player_id; /* A unique identifier for this media player.*/ - UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/ - UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/ + UINT16 player_id; /* A unique identifier for this media player.*/ + UINT8 major_type; /* Use AVRC_MJ_TYPE_AUDIO, AVRC_MJ_TYPE_VIDEO, AVRC_MJ_TYPE_BC_AUDIO, or AVRC_MJ_TYPE_BC_VIDEO.*/ + UINT32 sub_type; /* Use AVRC_SUB_TYPE_NONE, AVRC_SUB_TYPE_AUDIO_BOOK, or AVRC_SUB_TYPE_PODCAST*/ UINT8 play_status; /* Use AVRC_PLAYSTATE_STOPPED, AVRC_PLAYSTATE_PLAYING, AVRC_PLAYSTATE_PAUSED, AVRC_PLAYSTATE_FWD_SEEK, - AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/ - tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/ - tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/ + AVRC_PLAYSTATE_REV_SEEK, or AVRC_PLAYSTATE_ERROR*/ + tAVRC_FEATURE_MASK features; /* Supported feature bit mask*/ + tAVRC_FULL_NAME name; /* The player name, name length and character set id.*/ } tAVRC_ITEM_PLAYER; typedef struct @@ -916,7 +929,7 @@ typedef struct tAVRC_UID uid; /* The uid of this folder */ UINT8 type; /* Use AVRC_FOLDER_TYPE_MIXED, AVRC_FOLDER_TYPE_TITLES, AVRC_FOLDER_TYPE_ALNUMS, AVRC_FOLDER_TYPE_ARTISTS, AVRC_FOLDER_TYPE_GENRES, - AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/ + AVRC_FOLDER_TYPE_PLAYLISTS, or AVRC_FOLDER_TYPE_YEARS.*/ BOOLEAN playable; /* TRUE, if the folder can be played. */ tAVRC_FULL_NAME name; /* The folder name, name length and character set id. */ } tAVRC_ITEM_FOLDER; @@ -985,7 +998,7 @@ typedef struct UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */ UINT8 num_val; tAVRC_APP_SETTING *p_vals; -} tAVRC_SET_APP_VALUE_CMD; +} tAVRC_SET_APP_VALUE_CMD; /* GetAppAttrTxt */ typedef struct @@ -1045,7 +1058,7 @@ typedef struct UINT8 opcode; /* Op Code (assigned by AVRC_BldCommand according to pdu) */ UINT8 event_id; UINT32 param; -} tAVRC_REG_NOTIF_CMD; +} tAVRC_REG_NOTIF_CMD; /* SetAddrPlayer */ typedef struct @@ -1227,7 +1240,7 @@ typedef struct UINT8 opcode; /* Op Code (copied from avrc_cmd.opcode by AVRC_BldResponse user. invalid one to generate according to pdu) */ UINT8 num_val; tAVRC_APP_SETTING *p_vals; -} tAVRC_GET_CUR_APP_VALUE_RSP; +} tAVRC_GET_CUR_APP_VALUE_RSP; /* GetAppAttrTxt */ typedef struct @@ -1292,7 +1305,7 @@ typedef union UINT8 volume; } tAVRC_NOTIF_RSP_PARAM; -/* RegNotify */ +/* RegNotify */ typedef struct { UINT8 pdu; diff --git a/stack/include/bnep_api.h b/stack/include/bnep_api.h index 4ac9abb..b2bc0fd 100644 --- a/stack/include/bnep_api.h +++ b/stack/include/bnep_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: bnep_api.h -** -** Description: This interface file contains the interface to the Bluetooth -** Network Encapsilation Protocol (BNEP). -** -** -** Copyright (c) 2001-2004, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2001-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This interface file contains the interface to the Bluetooth Network + * Encapsilation Protocol (BNEP). + * + ******************************************************************************/ #ifndef BNEP_API_H #define BNEP_API_H @@ -19,7 +32,7 @@ *****************************************************************************/ /* Define the minimum offset needed in a GKI buffer for -** sending BNEP packets. Note, we are currently not sending +** sending BNEP packets. Note, we are currently not sending ** extension headers, but may in the future, so allow ** space for them */ @@ -53,7 +66,7 @@ enum BNEP_IGNORE_CMD, /* To ignore the rcvd command */ BNEP_TX_FLOW_ON, /* tx data flow enabled */ BNEP_TX_FLOW_OFF /* tx data flow disabled */ - + }; typedef UINT8 tBNEP_RESULT; @@ -223,7 +236,7 @@ extern "C" { ** its callbacks with BNEP ** ** Parameters: p_reg_info - contains all callback function pointers -** +** ** ** Returns BNEP_SUCCESS if registered successfully ** BNEP_FAILURE if connection state callback is missing @@ -239,7 +252,7 @@ BNEP_API extern tBNEP_RESULT BNEP_Register (tBNEP_REGISTER *p_reg_info); ** its callbacks. ** ** Parameters: void -** +** ** ** Returns void ** @@ -273,7 +286,7 @@ BNEP_API extern tBNEP_RESULT BNEP_Connect (BD_ADDR p_rem_bda, ** Function BNEP_ConnectResp ** ** Description This function is called in responce to connection indication -** +** ** ** Parameters: handle - handle given in the connection indication ** resp - responce for the connection indication diff --git a/stack/include/bt_types.h b/stack/include/bt_types.h index 801b153..5809968 100644 --- a/stack/include/bt_types.h +++ b/stack/include/bt_types.h @@ -1,14 +1,20 @@ -/**************************************************************************** -** -** Name bt_types.h -** -** Function this file contains definitions that are shared between -** units in the Bluetooth system such as events. -** -** Copyright (c) 1999-2010, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef BT_TYPES_H #define BT_TYPES_H @@ -29,7 +35,7 @@ ** that global events MUST be one of these events defined below. ** ** The convention used is the the event name contains the layer that the -** event is going to. +** event is going to. */ #define BT_EVT_MASK 0xFF00 #define BT_SUB_EVT_MASK 0x00FF @@ -149,7 +155,7 @@ /* BPP Events */ #define BT_EVT_TO_BPP_PR_CMDS 0x6100 /* Printer Events */ -#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */ +#define BT_EVT_TO_BPP_SND_CMDS 0x6200 /* BPP Sender Events */ /* BIP Events */ #define BT_EVT_TO_BIP_CMDS 0x6300 @@ -205,7 +211,7 @@ typedef struct #define BT_PSM_BNEP 0x000F #define BT_PSM_HIDC 0x0011 #define BT_PSM_HIDI 0x0013 -#define BT_PSM_UPNP 0x0015 +#define BT_PSM_UPNP 0x0015 #define BT_PSM_AVCTP 0x0017 #define BT_PSM_AVDTP 0x0019 #define BT_PSM_AVCTP_13 0x001B /* Advanced Control - Browsing */ @@ -353,7 +359,7 @@ typedef struct { UINT32 token_bucket_size; /* bytes */ UINT32 peak_bandwidth; /* bytes/second */ UINT32 latency; /* microseconds */ - UINT32 delay_variation; /* microseconds */ + UINT32 delay_variation; /* microseconds */ } FLOW_SPEC; /* Values for service_type */ @@ -459,8 +465,8 @@ typedef struct */ /* Structure to hold connection stats */ -#ifndef BT_CONN_STATS_DEFINED -#define BT_CONN_STATS_DEFINED +#ifndef BT_CONN_STATS_DEFINED +#define BT_CONN_STATS_DEFINED /* These bits are used in the bIsConnected field */ #define BT_CONNECTED_USING_BREDR 1 @@ -563,11 +569,11 @@ typedef UINT8 tBT_DEVICE_TYPE; #define TRACE_LAYER_BNEP 0x001b0000 #define TRACE_LAYER_PAN 0x001c0000 #define TRACE_LAYER_HFP 0x001d0000 -#define TRACE_LAYER_HID 0x001e0000 -#define TRACE_LAYER_BIP 0x001f0000 -#define TRACE_LAYER_AVP 0x00200000 -#define TRACE_LAYER_A2D 0x00210000 -#define TRACE_LAYER_SAP 0x00220000 +#define TRACE_LAYER_HID 0x001e0000 +#define TRACE_LAYER_BIP 0x001f0000 +#define TRACE_LAYER_AVP 0x00200000 +#define TRACE_LAYER_A2D 0x00210000 +#define TRACE_LAYER_SAP 0x00220000 #define TRACE_LAYER_AMP 0x00230000 #define TRACE_LAYER_MCA 0x00240000 #define TRACE_LAYER_ATT 0x00250000 @@ -627,7 +633,7 @@ typedef UINT8 tBT_DEVICE_TYPE; #define TRACE_TYPE_CMD_TX 0x0000000b #define TRACE_TYPE_EVT_TX 0x0000000c #define TRACE_TYPE_ACL_TX 0x0000000d -#define TRACE_TYPE_CMD_RX 0x0000000e +#define TRACE_TYPE_CMD_RX 0x0000000e #define TRACE_TYPE_EVT_RX 0x0000000f #define TRACE_TYPE_ACL_RX 0x00000010 #define TRACE_TYPE_TARGET_TRACE 0x00000011 @@ -676,7 +682,7 @@ typedef UINT8 tBT_DEVICE_TYPE; /* Define PSMs HID uses */ #define HID_PSM_CONTROL 0x0011 #define HID_PSM_INTERRUPT 0x0013 - + /* Define a function for logging */ typedef void (BT_LOG_FUNC) (int trace_type, const char *fmt_str, ...); diff --git a/stack/include/btm_api.h b/stack/include/btm_api.h index 76b6e03..09bb749 100644 --- a/stack/include/btm_api.h +++ b/stack/include/btm_api.h @@ -1,21 +1,27 @@ -/***************************************************************************** -** -** Name: btm_api.h -** -** Description: This file contains the Bluetooth Manager (BTM) API function -** external definitions. -** -** The BTM consists of several management entities: -** 1. Device Control - controls the local device -** 2. Device Discovery - manages inquiries, discover database -** 3. ACL Channels - manages ACL connections -** 4. SCO Channels - manages SCO connections -** 5. Security - manages all security functionality -** 6. Power Management - manages park, sniff, hold, etc. (optional) -** -** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains the Bluetooth Manager (BTM) API function external + * definitions. + * + ******************************************************************************/ #ifndef BTM_API_H #define BTM_API_H @@ -452,7 +458,7 @@ enum /* BTM_EIR_UUID_SERVCLASS_HDP_PROFILE */ BTM_EIR_UUID_SERVCLASS_MESSAGE_ACCESS, BTM_EIR_UUID_SERVCLASS_MESSAGE_NOTIFICATION, - BTM_EIR_UUID_SERVCLASS_HDP_SOURCE, + BTM_EIR_UUID_SERVCLASS_HDP_SOURCE, BTM_EIR_UUID_SERVCLASS_HDP_SINK, BTM_EIR_MAX_SERVICES }; @@ -494,7 +500,7 @@ typedef UINT8 tBTM_EIR_SEARCH_RESULT; #if BLE_INCLUDED == TRUE #define BTM_BLE_SEC_NONE 0 #define BTM_BLE_SEC_ENCRYPT 1 /* encrypt the link using current key */ -#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2 +#define BTM_BLE_SEC_ENCRYPT_NO_MITM 2 #define BTM_BLE_SEC_ENCRYPT_MITM 3 typedef UINT8 tBTM_BLE_SEC_ACT; #endif @@ -630,7 +636,7 @@ typedef struct typedef struct { - UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps; + UINT8 pcm_intf_rate; /* PCM interface rate: 0: 128kbps, 1: 256 kbps; 2:512 bps; 3: 1024kbps; 4: 2048kbps */ UINT8 frame_type; /* frame type: 0: short; 1: long */ UINT8 sync_mode; /* sync mode: 0: slave; 1: master */ @@ -908,7 +914,7 @@ typedef UINT8 tBTM_SCO_TYPE; /******************* -** SCO Routing Path +** SCO Routing Path ********************/ #define BTM_SCO_ROUTE_PCM HCI_BRCM_SCO_ROUTE_PCM #define BTM_SCO_ROUTE_HCI HCI_BRCM_SCO_ROUTE_HCI @@ -916,7 +922,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE; /******************* -** SCO Codec Types +** SCO Codec Types ********************/ #define BTM_SCO_CODEC_NONE 0x0000 #define BTM_SCO_CODEC_CVSD 0x0001 @@ -924,7 +930,7 @@ typedef UINT8 tBTM_SCO_ROUTE_TYPE; typedef UINT16 tBTM_SCO_CODEC_TYPE; /******************* -** SCO Voice Settings +** SCO Voice Settings ********************/ #define BTM_VOICE_SETTING_CVSD ((UINT16) (HCI_INP_CODING_LINEAR | \ HCI_INP_DATA_FMT_2S_COMPLEMENT | \ @@ -937,7 +943,7 @@ typedef UINT16 tBTM_SCO_CODEC_TYPE; HCI_AIR_CODING_FORMAT_TRANSPNT)) /******************* -** SCO Data Status +** SCO Data Status ********************/ enum { @@ -945,7 +951,7 @@ enum BTM_SCO_DATA_PAR_ERR, BTM_SCO_DATA_NONE, BTM_SCO_DATA_PAR_LOST -}; +}; typedef UINT8 tBTM_SCO_DATA_FLAG; /*************************** @@ -1494,7 +1500,7 @@ typedef union tBTM_SP_LOC_OOB loc_oob; /* BTM_SP_LOC_OOB_EVT */ tBTM_SP_RMT_OOB rmt_oob; /* BTM_SP_RMT_OOB_EVT */ tBTM_SP_COMPLT complt; /* BTM_SP_COMPLT_EVT */ - tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */ + tBTM_SP_UPGRADE upgrade; /* BTM_SP_UPGRADE_EVT */ } tBTM_SP_EVT_DATA; /* Simple Pairing Events. Called by the stack when Simple Pairing related @@ -1519,7 +1525,7 @@ typedef void (tBTM_SEC_CBACK) (BD_ADDR bd_addr, void *p_ref_data, tBTM_STATUS re */ typedef void (tBTM_BOND_CANCEL_CMPL_CALLBACK) (tBTM_STATUS result); -/* LE related event and data structure +/* LE related event and data structure */ enum { @@ -1541,7 +1547,7 @@ typedef UINT8 tBTM_LE_EVT; #define BTM_LE_KEY_LCSRK (SMP_SEC_KEY_TYPE_CSRK << 3) /* local CSRK has been deliver to peer */ typedef UINT8 tBTM_LE_KEY_TYPE; -#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */ +#define BTM_LE_AUTH_REQ_NO_BOND SMP_AUTH_NO_BOND /* 0 */ #define BTM_LE_AUTH_REQ_BOND SMP_AUTH_GEN_BOND /* 1 << 0 */ #define BTM_LE_AUTH_REQ_MITM SMP_AUTH_YN_BIT /* 1 << 2 */ typedef UINT8 tBTM_LE_AUTH_REQ; @@ -1549,9 +1555,9 @@ typedef UINT8 tBTM_LE_AUTH_REQ; #define BTM_LE_AUTH_REQ_MASK SMP_AUTH_MASK /* 0x03*/ /* LE security level */ -#define BTM_LE_SEC_NONE SMP_SEC_NONE -#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE -#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED +#define BTM_LE_SEC_NONE SMP_SEC_NONE +#define BTM_LE_SEC_UNAUTHENTICATE SMP_SEC_UNAUTHENTICATE +#define BTM_LE_SEC_AUTHENTICATED SMP_SEC_AUTHENTICATED typedef UINT8 tBTM_LE_SEC; @@ -1643,7 +1649,7 @@ typedef UINT8 (tBTM_LE_CALLBACK) (tBTM_LE_EVT event, BD_ADDR bda, tBTM_LE_EVT_DA #define BTM_BLE_KEY_TYPE_ID 1 #define BTM_BLE_KEY_TYPE_ER 2 -#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete +#define BTM_BLE_KEY_TYPE_COUNTER 3 //tobe obsolete typedef struct { @@ -1679,7 +1685,7 @@ typedef struct tBTM_ABORT_CALLBACK *p_abort_callback; tBTM_BOND_CANCEL_CMPL_CALLBACK *p_bond_cancel_cmpl_callback; tBTM_SP_CALLBACK *p_sp_callback; -#if BLE_INCLUDED == TRUE +#if BLE_INCLUDED == TRUE #if SMP_INCLUDED == TRUE tBTM_LE_CALLBACK *p_le_callback; #endif @@ -2066,7 +2072,7 @@ extern "C" { ** ** Function BTM_ReadLocalDeviceNameFromController ** -** Description Get local device name from controller. Do not use cached +** Description Get local device name from controller. Do not use cached ** name (used to get chip-id prior to btm reset complete). ** ** Returns BTM_CMD_STARTED if successful, otherwise an error @@ -2747,7 +2753,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn); ** Function BTM_ReadInquiryRspTxPower ** ** Description This command will read the inquiry Transmit Power level used -** to transmit the FHS and EIR data packets. +** to transmit the FHS and EIR data packets. ** This can be used directly in the Tx Power Level EIR data type. ** ** Returns BTM_SUCCESS if successful @@ -2759,8 +2765,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn); ** ** Function BTM_WriteInquiryTxPower ** -** Description This command is used to write the inquiry transmit power level -** used to transmit the inquiry (ID) data packets. The Controller +** Description This command is used to write the inquiry transmit power level +** used to transmit the inquiry (ID) data packets. The Controller ** should use the supported TX power level closest to the Tx_Power ** parameter. ** @@ -3127,8 +3133,8 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn); ** ** Function BTM_ReadTxPower ** -** Description This function is called to read the current connection -** TX power of the connection. The TX power level results +** Description This function is called to read the current connection +** TX power of the connection. The TX power level results ** are returned in the callback. ** (tBTM_RSSI_RESULTS) ** @@ -3379,7 +3385,7 @@ BTM_API extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn); ** WBS codec for the upcoming eSCO connection. ** ** Returns BTM_SUCCESS. -** +** ** *******************************************************************************/ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); @@ -3649,8 +3655,8 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** Returns TRUE if registered OK, else FALSE ** *******************************************************************************/ - BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id, - UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id, + BTM_API extern BOOLEAN BTM_SetUCDSecurityLevel (BOOLEAN is_originator, char *p_name, UINT8 service_id, + UINT16 sec_level, UINT16 psm, UINT32 mx_proto_id, UINT32 mx_chan_id); /******************************************************************************* @@ -3684,7 +3690,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** ** Function BTM_SecClrUCDService ** -** Description +** Description ** ** Parameters Service ID - Id of the service to remove. ('0' removes all service ** records. @@ -3966,7 +3972,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** ** Function BTM_ReadOobData ** -** Description This function is called to parse the OOB data payload +** Description This function is called to parse the OOB data payload ** received over OOB (non-Bluetooth) link ** ** Parameters: p_data - the location for OOB data @@ -4343,7 +4349,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** main stack (running on phone baseband) to embedded light stack ** (running on Multimedia or Bluetooth Controller chip) ** -** Parameters +** Parameters ** p_sync_callback: callback function for event notification ** Returns ** @@ -4373,10 +4379,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** Function BTM_IpcSendBuf ** ** Description For Dual-Stack support. Called to send ipc messages from -** full stack to lite stack and vice-versa. This API is +** full stack to lite stack and vice-versa. This API is ** typically called by bta layers e.g. bta_av_sync. ** -** +** ** Parameters p_buf: Pointer to the buffer to be passed in the IPC message ** ** Returns void @@ -4455,7 +4461,7 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** ** Parameter codec_type: codec_type to be used for sco connection. ** role: master or slave role -** sample_rate: sampling rate +** sample_rate: sampling rate ** clock_rate:clock rate 128K to 2048K ** ** @@ -4472,14 +4478,14 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** ** Function BTM_ConfigScoPath ** -** Description This function enable/disable SCO over HCI and registers SCO -** data callback if SCO over HCI is enabled. +** Description This function enable/disable SCO over HCI and registers SCO +** data callback if SCO over HCI is enabled. ** ** Parameter path: SCO or HCI -** p_sco_data_cb: callback function or SCO data if path is set +** p_sco_data_cb: callback function or SCO data if path is set ** to transport. ** p_pcm_param: pointer to the PCM interface parameter. If a NULL -** pointer is used, PCM parameter maintained in +** pointer is used, PCM parameter maintained in ** the control block will be used; otherwise update ** control block value. ** err_data_rpt: Lisbon feature to enable the erronous data report @@ -4489,10 +4495,10 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** BTM_NO_RESOURCES: no rsource to start the command. ** BTM_ILLEGAL_VALUE: invalid callback function pointer. ** BTM_CMD_STARTED :Command sent. Waiting for command cmpl event. -** +** ** *******************************************************************************/ - BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path, + BTM_API extern tBTM_STATUS BTM_ConfigScoPath (tBTM_SCO_ROUTE_TYPE path, tBTM_SCO_DATA_CB *p_sco_data_cb, tBTM_SCO_PCM_PARAM *p_pcm_param, BOOLEAN err_data_rpt); @@ -4502,20 +4508,20 @@ BTM_API extern tBTM_STATUS BTM_SetWBSCodec (tBTM_SCO_CODEC_TYPE codec_type); ** Function BTM_WriteScoData ** ** Description This function write SCO data to a specified instance. The data -** to be written p_buf needs to carry an offset of -** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not +** to be written p_buf needs to carry an offset of +** HCI_SCO_PREAMBLE_SIZE bytes, and the data length can not ** exceed BTM_SCO_DATA_SIZE_MAX bytes, whose default value is set -** to 60 and is configurable. Data longer than the maximum bytes -** will be truncated. +** to 60 and is configurable. Data longer than the maximum bytes +** will be truncated. ** ** Returns BTM_SUCCESS: data write is successful ** BTM_ILLEGAL_VALUE: SCO data contains illegal offset value. -** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet -** size. +** BTM_SCO_BAD_LENGTH: SCO data length exceeds the max SCO packet +** size. ** BTM_NO_RESOURCES: no resources. ** BTM_UNKNOWN_ADDR: unknown SCO connection handle, or SCO is not ** routed via HCI. -** +** ** *******************************************************************************/ BTM_API extern tBTM_STATUS BTM_WriteScoData (UINT16 sco_inx, BT_HDR *p_buf); diff --git a/stack/include/btm_ble_api.h b/stack/include/btm_ble_api.h index 4bcd797..8456b9f 100644 --- a/stack/include/btm_ble_api.h +++ b/stack/include/btm_ble_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: btm_ble_api.h -** -** Description: This file contains the Bluetooth Manager (BTM) API function -** external definitions. -** -** -** Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains the Bluetooth Manager (BTM) API function external + * definitions. + * + ******************************************************************************/ #ifndef BTM_BLE_API_H #define BTM_BLE_API_H @@ -29,7 +42,7 @@ typedef UINT8 tBTM_BLE_SCAN_MODE; typedef UINT8 tBTM_BLE_ADV_CHNL_MAP; /*d efault advertising channel map */ -#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP +#ifndef BTM_BLE_DEFAULT_ADV_CHNL_MAP #define BTM_BLE_DEFAULT_ADV_CHNL_MAP (BTM_BLE_ADV_CHNL_37| BTM_BLE_ADV_CHNL_38| BTM_BLE_ADV_CHNL_39) #endif @@ -71,7 +84,7 @@ typedef UINT8 tBTM_BLE_SFP; #define BTM_BLE_CONN_SUP_TOUT_MAX 0x0C80 #define BTM_BLE_CONN_PARAM_UNDEF 0xffff /* use this value when a specific value not to be overwritten */ -/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */ +/* default connection parameters if not configured, use GAP recommend value for auto/selective connection */ /* default scan interval */ #ifndef BTM_BLE_CONN_EST_SCAN_INT #define BTM_BLE_CONN_EST_SCAN_INT 96 /* 312.5 ms = 500 *0.625 */ @@ -103,7 +116,7 @@ typedef UINT8 tBTM_BLE_SFP; #endif /* default supervision timeout */ #ifndef BTM_BLE_CONN_TIMEOUT_DEF -#define BTM_BLE_CONN_TIMEOUT_DEF 2000 +#define BTM_BLE_CONN_TIMEOUT_DEF 2000 #endif #define BTM_CMAC_TLEN_SIZE 8 /* 64 bits */ @@ -136,7 +149,7 @@ typedef struct { UINT8 adv_int_min; UINT8 adv_int_max; - tBTM_BLE_CHNL_MAP chnl_map; + tBTM_BLE_CHNL_MAP chnl_map; }tBTM_BLE_ADV_PARAMS; @@ -187,7 +200,7 @@ typedef struct typedef struct { UINT8 num_service; - BOOLEAN list_cmpl; + BOOLEAN list_cmpl; UINT16 *p_uuid; }tBTM_BLE_SERVICE; @@ -203,7 +216,7 @@ typedef struct #define BTM_BLE_NUM_AD_ATTR_MAX 10 #endif /* attribute list contained in adv data */ -typedef struct +typedef struct { UINT8 num_attr; tBTM_BLE_ATTR attr_list[BTM_BLE_NUM_AD_ATTR_MAX]; @@ -215,7 +228,7 @@ typedef struct UINT8 *p_val; }tBTM_BLE_MANU; -typedef struct +typedef struct { UINT8 adv_type; UINT8 len; @@ -244,7 +257,7 @@ typedef struct typedef struct { UINT8 conn_mode; - tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */ + tBTM_BLE_AD_MASK ad_mask; /* mask of the valid adv data field */ UINT8 flag; UINT8 tx_power_level; UINT8 remote_name_len; @@ -292,15 +305,15 @@ extern "C" { ** Returns TRUE if added OK, else FALSE ** *******************************************************************************/ -BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, +BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type); /******************************************************************************* ** ** Function BTM_SecAddBleKey ** -** Description Add/modify LE device information. This function will be -** normally called during host startup to restore all required +** Description Add/modify LE device information. This function will be +** normally called during host startup to restore all required ** information stored in the NVRAM. ** ** Parameters: bd_addr - BD address of the peer @@ -310,7 +323,7 @@ BTM_API extern BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, ** Returns TRUE if added OK, else FALSE ** *******************************************************************************/ -BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, +BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_KEY_TYPE key_type); /******************************************************************************* @@ -320,11 +333,11 @@ BTM_API extern BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_l ** Description This function is called to set advertising parameters. ** ** Parameters: None. -** +** ** Returns void ** *******************************************************************************/ -BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max, +BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_int_max, tBLE_BD_ADDR *p_dir_bda, tBTM_BLE_ADV_CHNL_MAP chnl_map); /******************************************************************************* @@ -334,11 +347,11 @@ BTM_API extern tBTM_STATUS BTM_BleSetAdvParams(UINT16 adv_int_min, UINT16 adv_in ** Description This function is called to write advertising data. ** ** Parameters: None. -** +** ** Returns void ** *******************************************************************************/ -BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, +BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p_data); /******************************************************************************* @@ -349,9 +362,9 @@ BTM_API extern tBTM_STATUS BTM_BleWriteAdvData(tBTM_BLE_AD_MASK data_mask, ** ** Parameters adv_int_min: minimum advertising interval ** adv_int_max: maximum advertising interval -** p_dir_bda: connectable direct initiator's LE device address +** p_dir_bda: connectable direct initiator's LE device address ** chnl_map: advertising channel map. -** +** ** Returns void ** *******************************************************************************/ @@ -368,7 +381,7 @@ BTM_API extern void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_m ** Parameters adv_int_min: minimum advertising interval ** adv_int_max: maximum advertising interval ** scan_type: scan mode. -** +** ** Returns void ** *******************************************************************************/ @@ -382,11 +395,11 @@ BTM_API extern void BTM_BleSetScanParams(UINT16 scan_interval, UINT16 scan_windo ** Description This function is called to write LE scan response. ** ** Parameters: p_scan_rsp: scan response. -** +** ** Returns status ** *******************************************************************************/ -BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, +BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, tBTM_BLE_ADV_DATA *p_data); /******************************************************************************* @@ -396,7 +409,7 @@ BTM_API extern tBTM_STATUS BTM_BleWriteScanRsp(tBTM_BLE_AD_MASK data_mask, ** Description This function is called to reset ULP controller. ** ** Parameters None. -** +** ** Returns void ** *******************************************************************************/ @@ -406,15 +419,15 @@ BTM_API extern void BTM_BleReset(void); ** ** Function BTM_BleObserve ** -** Description This procedure keep the device listening for advertising -** events from a broadcast device. +** Description This procedure keep the device listening for advertising +** events from a broadcast device. ** ** Parameters start: start or stop observe. -** +** ** Returns void ** *******************************************************************************/ -BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration, +BTM_API extern tBTM_STATUS BTM_BleObserve(BOOLEAN start, UINT8 duration, tBTM_INQ_RESULTS_CB *p_results_cb, tBTM_CMPL_CB *p_cmpl_cb); @@ -463,8 +476,8 @@ BTM_API extern void BTM_GetDeviceDHK (BT_OCTET16 dhk); ** Description This function is called to grant security process. ** ** Parameters bd_addr - peer device bd address. -** res - result of the operation BTM_SUCCESS if success. -** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts. +** res - result of the operation BTM_SUCCESS if success. +** Otherwise, BTM_REPEATED_ATTEMPTS is too many attempts. ** ** Returns None ** @@ -479,7 +492,7 @@ BTM_API extern void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res); ** passkey request to the application. ** ** Parameters: bd_addr - Address of the device for which passkey was requested -** res - result of the operation SMP_SUCCESS if success +** res - result of the operation SMP_SUCCESS if success ** passkey - numeric value in the range of ** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)). ** @@ -494,7 +507,7 @@ BTM_API extern void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 pass ** SMP in response to BTM_LE_OOB_REQ_EVT ** ** Parameters: bd_addr - Address of the peer device -** res - result of the operation SMP_SUCCESS if success +** res - result of the operation SMP_SUCCESS if success ** p_data - simple pairing Randomizer C. ** *******************************************************************************/ @@ -510,14 +523,14 @@ BTM_API extern void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, U ** ** Parameter bd_addr: target device the data to be signed for. ** p_text: singing data -** len: length of the signing data -** signature: output parameter where data signature is going to -** be stored. +** len: length of the signing data +** signature: output parameter where data signature is going to +** be stored. ** ** Returns TRUE if signing sucessul, otherwise FALSE. ** *******************************************************************************/ -BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, +BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, BLE_SIGNATURE signature); /******************************************************************************* @@ -528,14 +541,14 @@ BTM_API extern BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UIN ** ** Parameter bd_addr: target device the data to be signed for. ** p_orig: original data before signature. -** len: length of the signing data +** len: length of the signing data ** counter: counter used when doing data signing -** p_comp: signature to be compared against. +** p_comp: signature to be compared against. ** Returns TRUE if signature verified correctly; otherwise FALSE. ** *******************************************************************************/ -BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, +BTM_API extern BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT32 counter, UINT8 *p_comp); @@ -583,17 +596,17 @@ BTM_API extern void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_ ** ** Function BTM_BleSetBgConnType ** -** Description This function is called to set BLE background connection +** Description This function is called to set BLE background connection ** procedure type. It can be auto connection, or selective connection. ** -** Parameters conn_type: it can be auto connection, or selective connection. +** Parameters conn_type: it can be auto connection, or selective connection. ** p_select_cback: callback function when selective connection procedure ** is being used. -** +** ** Returns void ** *******************************************************************************/ -BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type, +BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type, tBTM_BLE_SEL_CBACK *p_select_cback); /******************************************************************************* @@ -607,7 +620,7 @@ BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type, ** ** Parameters add_remove: TRUE to add; FALSE to remove. ** remote_bda: device address to add/remove. -** +** ** Returns void ** *******************************************************************************/ @@ -620,7 +633,7 @@ BTM_API extern BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR remo ** ** Description Set a peripheral's preferred connection parameters. When ** any of the value does not want to be updated while others -** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to +** do, use BTM_BLE_CONN_PARAM_UNDEF for the ones want to ** leave untouched. ** ** Parameters: bd_addr - BD address of the peripheral @@ -660,7 +673,7 @@ BTM_API extern void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan ** type - finding ADV data type ** p_length - return the length of ADV data not including type ** -** Returns pointer of ADV data +** Returns pointer of ADV data ** *******************************************************************************/ BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_length); @@ -669,25 +682,25 @@ BTM_API extern UINT8 *BTM_CheckAdvData( UINT8 *p_adv, UINT8 type, UINT8 *p_leng ** ** Function BTM_ReadDevInfo ** -** Description This function is called to read the device/address type -** of BD address. +** Description This function is called to read the device/address type +** of BD address. ** ** Parameter remote_bda: remote device address ** p_dev_type: output parameter to read the device type. ** p_addr_type: output parameter to read the address type. ** *******************************************************************************/ -BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, +BTM_API extern void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR_TYPE *p_addr_type); /******************************************************************************* ** ** Function BTM_BleBroadcast ** -** Description This function is to start or stop broadcasting. +** Description This function is to start or stop broadcasting. ** ** Parameters start: start or stop broadcasting. -** +** ** Returns status. ** *******************************************************************************/ @@ -697,12 +710,12 @@ BTM_API extern tBTM_STATUS BTM_BleBroadcast(BOOLEAN start); ** ** Function BTM_RegisterScanReqEvt ** -** Description This function is called to register a scan request callback +** Description This function is called to register a scan request callback ** on the advertiser. ** ** Parameters p_scan_req_cback: scan request callback. If NULL, remove the -** registration. -** +** registration. +** ** Returns void ** *******************************************************************************/ diff --git a/stack/include/btu.h b/stack/include/btu.h index 6a3b68f..d33f0bb 100644 --- a/stack/include/btu.h +++ b/stack/include/btu.h @@ -1,15 +1,29 @@ -/*****************************************************************************/ -/* */ -/* Name: btu.h */ -/* */ -/* Description: this file contains the main Bluetooth Upper Layer */ -/* definitions. The Widcomm implementations of L2CAP */ -/* RFCOMM, SDP and the BTIf run as one GKI task. The */ -/* btu_task switches between them. */ -/* */ -/* Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved. */ -/* Broadcom Bluetooth Core. Proprietary and confidential. */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * this file contains the main Bluetooth Upper Layer definitions. The Broadcom + * implementations of L2CAP RFCOMM, SDP and the BTIf run as one GKI task. The + * btu_task switches between them. + * + ******************************************************************************/ + #ifndef BTU_H #define BTU_H @@ -133,8 +147,8 @@ typedef void (*tBTU_EVENT_CALLBACK)(BT_HDR *p_hdr); /* BTU internal timer for BLE activity */ #define BTU_TTYPE_BLE_INQUIRY 99 #define BTU_TTYPE_BLE_GAP_LIM_DISC 100 -#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101 -#define BTU_TTYPE_SMP_PAIRING_CMD 102 +#define BTU_TTYPE_ATT_WAIT_FOR_RSP 101 +#define BTU_TTYPE_SMP_PAIRING_CMD 102 #define BTU_TTYPE_BLE_RANDOM_ADDR 103 #define BTU_TTYPE_ATT_WAIT_FOR_APP_RSP 104 #define BTU_TTYPE_ATT_WAIT_FOR_IND_ACK 105 @@ -246,7 +260,7 @@ BTU_API extern const BD_ADDR BT_BD_ANY; /* Functions provided by btu_task.c ************************************ */ -BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout); +BTU_API extern void btu_start_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout); BTU_API extern void btu_stop_timer (TIMER_LIST_ENT *p_tle); BTU_API extern void btu_register_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout, tBTU_TIMER_CALLBACK timer_cb); BTU_API extern void btu_deregister_timer(TIMER_LIST_ENT *p_tle); @@ -257,13 +271,13 @@ BTU_API extern void btu_register_event_range (UINT16 range, tBTU_EVENT_CALLBACK BTU_API extern void btu_deregister_event_range (UINT16 range); BTU_API extern void btu_uipc_rx_cback(BT_HDR *p_msg); -BTU_API extern void btu_hcif_flush_cmd_queue(void); +BTU_API extern void btu_hcif_flush_cmd_queue(void); /* ** Quick Timer */ #if defined(QUICK_TIMER_TICKS_PER_SEC) && (QUICK_TIMER_TICKS_PER_SEC > 0) -#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC) -BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout); +#define QUICK_TIMER_TICKS (GKI_SECS_TO_TICKS (1)/QUICK_TIMER_TICKS_PER_SEC) +BTU_API extern void btu_start_quick_timer (TIMER_LIST_ENT *p_tle, UINT16 type, UINT32 timeout); BTU_API extern void btu_stop_quick_timer (TIMER_LIST_ENT *p_tle); BTU_API extern void btu_process_quick_timer_evt (void); BTU_API extern void process_quick_timer_evt (TIMER_LIST_Q *p_tlq); diff --git a/stack/include/dyn_mem.h b/stack/include/dyn_mem.h index c243fe8..3ad8361 100644 --- a/stack/include/dyn_mem.h +++ b/stack/include/dyn_mem.h @@ -1,15 +1,20 @@ -/**************************************************************************** -** -** Name: dyn_mem.h -** -** Function this file contains definitions used to determine if a component -** uses static or dynamic memory for its control blocks. -** -** -** Copyright (c) 2002-2011, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2002-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef DYN_MEM_H #define DYN_MEM_H diff --git a/stack/include/gatt_api.h b/stack/include/gatt_api.h index 1c64d1b..2d13e5a 100644 --- a/stack/include/gatt_api.h +++ b/stack/include/gatt_api.h @@ -1,18 +1,25 @@ -/**************************************************************************** -** -** Name: gatt_api.h -** Function this file contains the definitions for the GATT API -** -** -** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef GATT_API_H #define GATT_API_H #include "bt_target.h" -#include "gattdefs.h" +#include "gattdefs.h" /***************************************************************************** ** Constants @@ -24,7 +31,7 @@ #define GATT_WRITE_NOT_PERMIT 0x0003 #define GATT_INVALID_PDU 0x0004 #define GATT_INSUF_AUTHENTICATION 0x0005 -#define GATT_REQ_NOT_SUPPORTED 0x0006 +#define GATT_REQ_NOT_SUPPORTED 0x0006 #define GATT_INVALID_OFFSET 0x0007 #define GATT_INSUF_AUTHORIZATION 0x0008 #define GATT_PREPARE_Q_FULL 0x0009 @@ -51,7 +58,7 @@ #define GATT_MORE 0x008a #define GATT_INVALID_CFG 0x008b #define GATT_SERVICE_STARTED 0x008c -#define GATT_ENCRYPED_MITM GATT_SUCCESS +#define GATT_ENCRYPED_MITM GATT_SUCCESS #define GATT_ENCRYPED_NO_MITM 0x008d #define GATT_NOT_ENCRYPTED 0x008e @@ -62,30 +69,30 @@ typedef UINT8 tGATT_STATUS; #define GATT_RSP_ERROR 0x01 #define GATT_REQ_MTU 0x02 #define GATT_RSP_MTU 0x03 -#define GATT_REQ_FIND_INFO 0x04 -#define GATT_RSP_FIND_INFO 0x05 +#define GATT_REQ_FIND_INFO 0x04 +#define GATT_RSP_FIND_INFO 0x05 #define GATT_REQ_FIND_TYPE_VALUE 0x06 #define GATT_RSP_FIND_TYPE_VALUE 0x07 -#define GATT_REQ_READ_BY_TYPE 0x08 -#define GATT_RSP_READ_BY_TYPE 0x09 -#define GATT_REQ_READ 0x0A -#define GATT_RSP_READ 0x0B -#define GATT_REQ_READ_BLOB 0x0C -#define GATT_RSP_READ_BLOB 0x0D -#define GATT_REQ_READ_MULTI 0x0E -#define GATT_RSP_READ_MULTI 0x0F -#define GATT_REQ_READ_BY_GRP_TYPE 0x10 -#define GATT_RSP_READ_BY_GRP_TYPE 0x11 +#define GATT_REQ_READ_BY_TYPE 0x08 +#define GATT_RSP_READ_BY_TYPE 0x09 +#define GATT_REQ_READ 0x0A +#define GATT_RSP_READ 0x0B +#define GATT_REQ_READ_BLOB 0x0C +#define GATT_RSP_READ_BLOB 0x0D +#define GATT_REQ_READ_MULTI 0x0E +#define GATT_RSP_READ_MULTI 0x0F +#define GATT_REQ_READ_BY_GRP_TYPE 0x10 +#define GATT_RSP_READ_BY_GRP_TYPE 0x11 #define GATT_REQ_WRITE 0x12 /* 0001-0010 (write)*/ -#define GATT_RSP_WRITE 0x13 -#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/ -#define GATT_REQ_PREPARE_WRITE 0x16 -#define GATT_RSP_PREPARE_WRITE 0x17 -#define GATT_REQ_EXEC_WRITE 0x18 -#define GATT_RSP_EXEC_WRITE 0x19 -#define GATT_HANDLE_VALUE_NOTIF 0x1B -#define GATT_HANDLE_VALUE_IND 0x1D -#define GATT_HANDLE_VALUE_CONF 0x1E +#define GATT_RSP_WRITE 0x13 +#define GATT_CMD_WRITE 0x52 /* changed in V4.0 01001-0010(write cmd)*/ +#define GATT_REQ_PREPARE_WRITE 0x16 +#define GATT_RSP_PREPARE_WRITE 0x17 +#define GATT_REQ_EXEC_WRITE 0x18 +#define GATT_RSP_EXEC_WRITE 0x19 +#define GATT_HANDLE_VALUE_NOTIF 0x1B +#define GATT_HANDLE_VALUE_IND 0x1D +#define GATT_HANDLE_VALUE_CONF 0x1E #define GATT_SIGN_CMD_WRITE 0xD2 /* changed in V4.0 1101-0010 (signed write) see write cmd above*/ #define GATT_OP_CODE_MAX GATT_HANDLE_VALUE_CONF + 1 /* 0x1E = 30 + 1 = 31*/ @@ -102,16 +109,16 @@ typedef UINT8 tGATT_STATUS; #define GATT_CONN_CANCEL L2CAP_CONN_CANCEL /* 0x0100 L2CAP connection cancelled */ typedef UINT16 tGATT_DISCONN_REASON; -/* MAX GATT MTU size +/* MAX GATT MTU size */ -#ifndef GATT_MAX_MTU_SIZE +#ifndef GATT_MAX_MTU_SIZE #define GATT_MAX_MTU_SIZE 517 #endif -/* max legth of an attribute value +/* max legth of an attribute value */ -#ifndef GATT_MAX_ATTR_LEN - #define GATT_MAX_ATTR_LEN 600 +#ifndef GATT_MAX_ATTR_LEN + #define GATT_MAX_ATTR_LEN 600 #endif /* default GATT MTU size over LE link @@ -122,17 +129,17 @@ typedef UINT16 tGATT_DISCONN_REASON; */ #define GATT_INVALID_CONN_ID 0xFFFF -#ifndef GATT_CL_MAX_LCB +#ifndef GATT_CL_MAX_LCB #define GATT_CL_MAX_LCB 22 #endif -#ifndef GATT_MAX_SCCB +#ifndef GATT_MAX_SCCB #define GATT_MAX_SCCB 10 #endif -/* GATT notification caching timer, default to be three seconds +/* GATT notification caching timer, default to be three seconds */ #ifndef GATTC_NOTIF_TIMEOUT #define GATTC_NOTIF_TIMEOUT 3 @@ -144,7 +151,7 @@ typedef UINT16 tGATT_DISCONN_REASON; /* Attribute permissions */ -#define GATT_PERM_READ (1 << 0) /* bit 0 */ +#define GATT_PERM_READ (1 << 0) /* bit 0 */ #define GATT_PERM_READ_ENCRYPTED (1 << 1) /* bit 1 */ #define GATT_PERM_READ_ENC_MITM (1 << 2) /* bit 2 */ #define GATT_PERM_WRITE (1 << 4) /* bit 4 */ @@ -154,7 +161,7 @@ typedef UINT16 tGATT_DISCONN_REASON; #define GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 */ typedef UINT16 tGATT_PERM; -#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */ +#define GATT_ENCRYPT_KEY_SIZE_MASK (0xF000) /* the MS nibble of tGATT_PERM; key size 7=0; size 16=9 */ #define GATT_READ_ALLOWED (GATT_PERM_READ | GATT_PERM_READ_ENCRYPTED | GATT_PERM_READ_ENC_MITM) #define GATT_READ_AUTH_REQUIRED (GATT_PERM_READ_ENC_MITM) @@ -223,7 +230,7 @@ enum }; typedef UINT8 tGATT_FORMAT; -/* Characteristic Presentation Format Descriptor value +/* Characteristic Presentation Format Descriptor value */ typedef struct { @@ -258,15 +265,15 @@ typedef struct #define GATT_CHAR_BIT_WRITE_AUX 0x0002 /* permits writes to the characteristic descriptor */ -/* characteristic descriptor: client configuration value +/* characteristic descriptor: client configuration value */ -#define GATT_CLT_CONFIG_NONE 0x0000 +#define GATT_CLT_CONFIG_NONE 0x0000 #define GATT_CLT_CONFIG_NOTIFICATION 0x0001 #define GATT_CLT_CONFIG_INDICATION 0x0002 typedef UINT16 tGATT_CLT_CHAR_CONFIG; -/* characteristic descriptor: server configuration value +/* characteristic descriptor: server configuration value */ #define GATT_SVR_CONFIG_NONE 0x0000 #define GATT_SVR_CONFIG_BROADCAST 0x0001 @@ -283,10 +290,10 @@ typedef UINT16 tGATT_SVR_CHAR_CONFIG; #define GATT_AUTH_REQ_NO_MITM 1 /* unauthenticated encryption */ #define GATT_AUTH_REQ_MITM 2 /* authenticated encryption */ #define GATT_AUTH_REQ_SIGNED_NO_MITM 3 -#define GATT_AUTH_REQ_SIGNED_MITM 4 +#define GATT_AUTH_REQ_SIGNED_MITM 4 typedef UINT8 tGATT_AUTH_REQ; -/* Attribute Value structure +/* Attribute Value structure */ typedef struct { @@ -314,7 +321,7 @@ enum { GATT_TRANSPORT_LE, GATT_TRANSPORT_BR_EDR, - GATT_TRANSPORT_LE_BR_EDR + GATT_TRANSPORT_LE_BR_EDR }; typedef UINT8 tGATT_TRANSPORT; @@ -349,7 +356,7 @@ typedef union tGATT_WRITE_REQ write_req; /* write */ /* prepare write */ /* write blob */ - UINT16 handle; /* handle value confirmation */ + UINT16 handle; /* handle value confirmation */ UINT16 mtu; /* MTU exchange request */ tGATT_EXEC_FLAG exec_write; /* execute write */ } tGATTS_DATA; @@ -368,7 +375,7 @@ typedef UINT8 tGATTS_REQ_TYPE; -/* Client Used Data Structure +/* Client Used Data Structure */ /* definition of different discovery types */ enum @@ -404,7 +411,7 @@ enum }; typedef UINT8 tGATT_READ_TYPE; -/* Read By Type Request (GATT_READ_BY_TYPE) Data +/* Read By Type Request (GATT_READ_BY_TYPE) Data */ typedef struct { @@ -414,7 +421,7 @@ typedef struct tBT_UUID uuid; } tGATT_READ_BY_TYPE; -/* GATT_READ_MULTIPLE request data +/* GATT_READ_MULTIPLE request data */ #define GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */ typedef struct @@ -428,18 +435,18 @@ typedef struct typedef struct { tGATT_AUTH_REQ auth_req; - UINT16 handle; + UINT16 handle; } tGATT_READ_BY_HANDLE; /* READ_BT_HANDLE_Request data */ typedef struct { tGATT_AUTH_REQ auth_req; - UINT16 handle; + UINT16 handle; UINT16 offset; } tGATT_READ_PARTIAL; -/* Read Request Data +/* Read Request Data */ typedef union { @@ -475,12 +482,12 @@ typedef union #define GATTC_OPTYPE_READ 2 #define GATTC_OPTYPE_WRITE 3 #define GATTC_OPTYPE_EXE_WRITE 4 -#define GATTC_OPTYPE_CONFIG 5 +#define GATTC_OPTYPE_CONFIG 5 #define GATTC_OPTYPE_NOTIFICATION 6 #define GATTC_OPTYPE_INDICATION 7 typedef UINT8 tGATTC_OPTYPE; -/* characteristic declaration +/* characteristic declaration */ typedef struct { @@ -489,8 +496,8 @@ typedef struct tBT_UUID char_uuid; /* characteristic UUID type */ } tGATT_CHAR_DCLR_VAL; -/* primary service group data -*/ +/* primary service group data +*/ typedef struct { UINT16 e_handle; /* ending handle of the group */ @@ -498,7 +505,7 @@ typedef struct } tGATT_GROUP_VALUE; -/* included service attribute value +/* included service attribute value */ typedef struct { @@ -510,17 +517,17 @@ typedef struct typedef union { tGATT_INCL_SRVC incl_service; /* include service value */ - tGATT_GROUP_VALUE group_value; /* Service UUID type. - This field is used with GATT_DISC_SRVC_ALL + tGATT_GROUP_VALUE group_value; /* Service UUID type. + This field is used with GATT_DISC_SRVC_ALL type of discovery result callback. */ - UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type - discovery result, it is the ending handle of a - known service to be discovered. When used with - GATT_DISC_INC_SRVC type discovery result, + UINT16 handle; /* When used with GATT_DISC_SRVC_BY_UUID type + discovery result, it is the ending handle of a + known service to be discovered. When used with + GATT_DISC_INC_SRVC type discovery result, it is the included service starting handle.*/ - tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value. + tGATT_CHAR_DCLR_VAL dclr_value; /* Characteristic declaration value. This field is used with GATT_DISC_CHAR type discovery.*/ } tGATT_DISC_VALUE; @@ -538,7 +545,7 @@ typedef UINT8 tGATT_IF; #define GATT_LINK_IDLE_TIMEOUT_WHEN_NO_APP 0 /* start a idle timer for this duration when no application need to use the link */ -#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF +#define GATT_LINK_NO_IDLE_TIMEOUT 0xFFFF #define GATT_INVALID_ACL_HANDLE 0xFFFF /* discover result callback function */ @@ -567,9 +574,9 @@ typedef struct { tGATT_CONN_CBACK *p_conn_cb; tGATT_CMPL_CBACK *p_cmpl_cb; - tGATT_DISC_RES_CB *p_disc_res_cb; - tGATT_DISC_CMPL_CB *p_disc_cmpl_cb; - tGATT_REQ_CBACK *p_req_cb; + tGATT_DISC_RES_CB *p_disc_res_cb; + tGATT_DISC_CMPL_CB *p_disc_cmpl_cb; + tGATT_REQ_CBACK *p_req_cb; } tGATT_CBACK; /*********************** Start Handle Management Definitions ********************** @@ -580,7 +587,7 @@ typedef struct { tBT_UUID app_uuid128; tBT_UUID svc_uuid; - UINT16 svc_inst; + UINT16 svc_inst; UINT16 s_handle; UINT16 e_handle; BOOLEAN is_primary; /* primary service or secondary */ @@ -595,7 +602,7 @@ typedef struct #define GATTS_SRV_CHG_CMD_READ_CLENT 5 typedef UINT8 tGATTS_SRV_CHG_CMD; -typedef struct +typedef struct { BD_ADDR bda; BOOLEAN srv_changed; @@ -616,7 +623,7 @@ typedef union -typedef struct +typedef struct { tGATTS_HNDL_RANGE *p_new_srv_start; } tGATTS_PENDING_NEW_SRV_START; @@ -666,8 +673,8 @@ extern "C" ** Function GATTS_AddHandleRange ** ** Description This function add the allocated handles range for the specifed -** application UUID, service UUID and service instance -** +** application UUID, service UUID and service instance +** ** Parameter p_hndl_range: pointer to allocated handles information ** ** Returns TRUE if handle range is added sucessfully; otherwise FALSE. @@ -681,7 +688,7 @@ extern "C" ** Function GATTS_NVRegister ** ** Description Application manager calls this function to register for -** NV save callback function. There can be one and only one +** NV save callback function. There can be one and only one ** NV save callback function. ** ** Parameter p_cb_info : callback informaiton @@ -722,11 +729,11 @@ extern "C" ** Parameter service_handle : To which service this included service is added to. ** include_svc_handle : included service handle. ** -** Returns included service attribute handle. If 0, add included service +** Returns included service attribute handle. If 0, add included service ** fail. ** *******************************************************************************/ - GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle, + GATT_API extern UINT16 GATTS_AddIncludeService (UINT16 service_handle, UINT16 include_svc_handle); @@ -744,7 +751,7 @@ extern "C" ** perm : Characteristic value declaration attribute permission. ** property : Characteristic Properties ** -** Returns Characteristic value declaration attribute handle. 0 if add +** Returns Characteristic value declaration attribute handle. 0 if add ** characteristic failed. ** *******************************************************************************/ @@ -755,18 +762,18 @@ extern "C" ** ** Function GATTS_AddCharDescriptor ** -** Description This function is called to add a characteristic descriptor -** into a service database. Add descriptor should follow add char -** to which it belongs, and next add char should be done only +** Description This function is called to add a characteristic descriptor +** into a service database. Add descriptor should follow add char +** to which it belongs, and next add char should be done only ** after all add descriptors for the previous char. ** -** Parameter service_handle : To which service this characteristic descriptor +** Parameter service_handle : To which service this characteristic descriptor ** is added to. -** perm : Characteristic value declaration attribute +** perm : Characteristic value declaration attribute ** permission. ** p_descr_uuid : Characteristic descriptor UUID. ** -** Returns Characteristic descriptor attribute handle. 0 if add +** Returns Characteristic descriptor attribute handle. 0 if add ** characteristic descriptor failed. ** *******************************************************************************/ @@ -801,7 +808,7 @@ extern "C" ** return GATT_SUCCESS if sucessfully started; otherwise error code. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle, + GATT_API extern tGATT_STATUS GATTS_StartService (tGATT_IF gatt_if, UINT16 service_handle, tGATT_TRANSPORT sup_transport); @@ -809,10 +816,10 @@ extern "C" ** ** Function GATTS_StopService ** -** Description This function is called to stop a service +** Description This function is called to stop a service +** +** Parameter service_handle : this is the start handle of a service ** -** Parameter service_handle : this is the start handle of a service -** ** Returns None. ** *******************************************************************************/ @@ -823,7 +830,7 @@ extern "C" ** ** Function GATTs_HandleValueIndication ** -** Description This function sends a handle value indication to a client. +** Description This function sends a handle value indication to a client. ** ** Parameter conn_id: connection identifier. ** attr_handle: Attribute handle of this handle value indication. @@ -833,15 +840,15 @@ extern "C" ** Returns GATT_SUCCESS if sucessfully sent or queued; otherwise error code. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, - UINT16 attr_handle, + GATT_API extern tGATT_STATUS GATTS_HandleValueIndication (UINT16 conn_id, + UINT16 attr_handle, UINT16 val_len, UINT8 *p_val); /******************************************************************************* ** ** Function GATTS_HandleValueNotification ** -** Description This function sends a handle value notification to a client. +** Description This function sends a handle value notification to a client. ** ** Parameter conn_id: connection identifier. ** attr_handle: Attribute handle of this handle value indication. @@ -869,7 +876,7 @@ extern "C" ** Returns GATT_SUCCESS if sucessfully sent; otherwise error code. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id, + GATT_API extern tGATT_STATUS GATTS_SendRsp (UINT16 conn_id, UINT32 trans_id, tGATT_STATUS status, tGATTS_RSP *p_msg); @@ -879,96 +886,96 @@ extern "C" /******************************************************************************* ** -** Function GATTC_ConfigureMTU +** Function GATTC_ConfigureMTU ** ** Description This function is called to configure the ATT MTU size for ** a connection on an LE transport. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** mtu - attribute MTU size.. ** -** Returns GATT_SUCCESS if command started successfully. +** Returns GATT_SUCCESS if command started successfully. ** *******************************************************************************/ GATT_API extern tGATT_STATUS GATTC_ConfigureMTU (UINT16 conn_id, UINT16 mtu); /******************************************************************************* ** -** Function GATTC_Discover +** Function GATTC_Discover ** ** Description This function is called to do a discovery procedure on ATT server. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** disc_type:discovery type. ** p_param: parameters of discovery requirement. ** -** Returns GATT_SUCCESS if command received/sent successfully. +** Returns GATT_SUCCESS if command received/sent successfully. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id, - tGATT_DISC_TYPE disc_type, + GATT_API extern tGATT_STATUS GATTC_Discover (UINT16 conn_id, + tGATT_DISC_TYPE disc_type, tGATT_DISC_PARAM *p_param ); /******************************************************************************* ** -** Function GATTC_Read +** Function GATTC_Read ** ** Description This function is called to read the value of an attribute from ** the server. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** type - attribute read type. ** p_read - read operation parameters. ** -** Returns GATT_SUCCESS if command started successfully. +** Returns GATT_SUCCESS if command started successfully. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, + GATT_API extern tGATT_STATUS GATTC_Read (UINT16 conn_id, tGATT_READ_TYPE type, tGATT_READ_PARAM *p_read); /******************************************************************************* ** -** Function GATTC_Write +** Function GATTC_Write ** ** Description This function is called to read the value of an attribute from ** the server. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** type - attribute write type. ** p_write - write operation parameters. ** -** Returns GATT_SUCCESS if command started successfully. +** Returns GATT_SUCCESS if command started successfully. ** *******************************************************************************/ - GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, + GATT_API extern tGATT_STATUS GATTC_Write (UINT16 conn_id, tGATT_WRITE_TYPE type, tGATT_VALUE *p_write); /******************************************************************************* ** -** Function GATTC_ExecuteWrite +** Function GATTC_ExecuteWrite ** ** Description This function is called to send an Execute write request to ** the server. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** is_execute - to execute or cancel the prepare write requet(s) ** -** Returns GATT_SUCCESS if command started successfully. +** Returns GATT_SUCCESS if command started successfully. ** *******************************************************************************/ GATT_API extern tGATT_STATUS GATTC_ExecuteWrite (UINT16 conn_id, BOOLEAN is_execute); /******************************************************************************* ** -** Function GATTC_SendHandleValueConfirm +** Function GATTC_SendHandleValueConfirm ** ** Description This function is called to send a handle value confirmation ** as response to a handle value notification from server. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** handle: the handle of the attribute confirmation. ** -** Returns GATT_SUCCESS if command started successfully. +** Returns GATT_SUCCESS if command started successfully. ** *******************************************************************************/ GATT_API extern tGATT_STATUS GATTC_SendHandleValueConfirm (UINT16 conn_id, UINT16 handle); @@ -978,7 +985,7 @@ extern "C" ** ** Function GATT_SetIdleTimeout ** -** Description This function (common to both client and server) sets the idle +** Description This function (common to both client and server) sets the idle ** timeout for a tansport connection ** ** Parameter bd_addr: target device bd address. @@ -994,7 +1001,7 @@ extern "C" ** ** Function GATT_Register ** -** Description This function is called to register an application +** Description This function is called to register an application ** with GATT ** ** Parameter p_app_uuid128: Application UUID @@ -1009,11 +1016,11 @@ extern "C" ** ** Function GATT_Deregister ** -** Description This function deregistered the application from GATT. +** Description This function deregistered the application from GATT. ** ** Parameters gatt_if: applicaiton interface. ** -** Returns None. +** Returns None. ** *******************************************************************************/ GATT_API extern void GATT_Deregister (tGATT_IF gatt_if); @@ -1039,7 +1046,7 @@ extern "C" ** ** Description This function initiate a connecttion to a ATT server. ** -** Parameters gatt_if: applicaiton interface +** Parameters gatt_if: applicaiton interface ** bd_addr: peer device address. ** is_direct: is a direct conenection or a background auto connection ** @@ -1056,7 +1063,7 @@ extern "C" ** Description This function initiate a cancel connecttion to a ATT server. ** ** Parameters gatt_if: client interface. If 0 used as unconditionally disconnect, -** typically used for direct connection cancellation. +** typically used for direct connection cancellation. ** bd_addr: peer device address. ** is_direct: is a direct conenection or a background auto connection ** @@ -1071,7 +1078,7 @@ extern "C" ** ** Description This function disconnect a logic channel. ** -** Parameters conn_id: connection identifier. +** Parameters conn_id: connection identifier. ** ** Returns GATT_SUCCESS if disconnected. ** @@ -1088,7 +1095,7 @@ extern "C" ** interface ** ** Parameters conn_id: connection id (input) -** p_gatt_if: applicaiton interface (output) +** p_gatt_if: applicaiton interface (output) ** bd_addr: peer device address. (output) ** ** Returns TRUE the ligical link information is found for conn_id @@ -1104,17 +1111,17 @@ extern "C" ** Description This function find the conn_id if the logical link for BD address ** and applciation interface is connected ** -** Parameters gatt_if: applicaiton interface (input) +** Parameters gatt_if: applicaiton interface (input) ** bd_addr: peer device address. (input) ** p_conn_id: connection id (output) ** -** Returns TRUE the ligical link is connected +** Returns TRUE the ligical link is connected ** *******************************************************************************/ GATT_API extern BOOLEAN GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, UINT16 *p_conn_id); #ifdef __cplusplus - + } #endif diff --git a/stack/include/gattdefs.h b/stack/include/gattdefs.h index def3270..6eac0f4 100644 --- a/stack/include/gattdefs.h +++ b/stack/include/gattdefs.h @@ -1,13 +1,26 @@ -/****************************************************************************/ -/* */ -/* Name: gattdefs.h */ -/* */ -/* Function this file contains internally used ATT definitions */ -/* */ -/* Copyright (c) 1999-2010, Broadcom Corp., All Rights Reserved. */ -/* WIDCOMM Bluetooth Core. Proprietary and confidential. */ -/* */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains internally used ATT definitions + * + ******************************************************************************/ #ifndef _GATTDEFS_H #define _GATTDEFS_H @@ -64,10 +77,10 @@ #define GATT_UUID_RINGER_SETTING 0x2A41 /* ringer setting */ /* Glucose Service */ -#define GATT_UUID_GM_MEASUREMENT 0x2A18 -#define GATT_UUID_GM_CONTEXT 0x2A34 -#define GATT_UUID_GM_CONTROL_POINT 0x2A52 -#define GATT_UUID_GM_FEATURE 0x2A51 +#define GATT_UUID_GM_MEASUREMENT 0x2A18 +#define GATT_UUID_GM_CONTEXT 0x2A34 +#define GATT_UUID_GM_CONTROL_POINT 0x2A52 +#define GATT_UUID_GM_FEATURE 0x2A51 /* device infor characteristic */ #define GATT_UUID_SYSTEM_ID 0x2A23 diff --git a/stack/include/goep_fs.h b/stack/include/goep_fs.h index 095449a..c5d054e 100644 --- a/stack/include/goep_fs.h +++ b/stack/include/goep_fs.h @@ -1,13 +1,20 @@ -/***************************************************************************** -** -** Name: goep_fs.h -** -** File: Object Storage API -** -** Copyright (c) 2000-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2000-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef GOEP_FS_H #define GOEP_FS_H @@ -125,7 +132,7 @@ typedef struct ** ** Callback Function: tGOEP_OPEN_CBACK ** -** Description This function is executed by OBX profiles to open +** Description This function is executed by OBX profiles to open ** a file for reading or writing. ** ** Parameters p_path - Fully qualified path and file name. @@ -134,7 +141,7 @@ typedef struct ** event_id - code that must be passed to the call-in function. ** ** Returns void -** +** ** Note: Upon completion of the request, a file descriptor (tGOEP_FD), ** file size (UINT32), and an status code (tGOEP_STATUS) ** are returned in GOEP_OpenRsp(). @@ -151,7 +158,7 @@ typedef void (tGOEP_OPEN_CBACK) (const UINT8 *p_name, UINT16 flags, UINT32 size, ** is no longer in use. ** ** Returns void -** +** *******************************************************************************/ typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id); @@ -159,11 +166,11 @@ typedef void (tGOEP_CLOSE_CBACK) (tGOEP_FD fd, UINT8 app_id); ** ** Callback Function: tGOEP_READ_CBACK ** -** Description This function is executed by OBX profiles to read in data from the +** Description This function is executed by OBX profiles to read in data from the ** previously opened file. ** ** Returns void -** +** ** Note: Upon completion of the request, GOEP_ReadRsp() is ** called with the buffer of data, along with the number ** of bytes read into the buffer, and a status. The @@ -179,11 +186,11 @@ typedef void (tGOEP_READ_CBACK) (tGOEP_FD fd, void *p_data, INT16 size, ** ** Callback Function: tGOEP_WRITE_CBACK ** -** Description This function is executed by OBX profiles to write the data to the +** Description This function is executed by OBX profiles to write the data to the ** previously opened file. ** ** Returns void -** +** ** Note: Upon completion of the request, GOEP_WriteRsp() is ** called with the file descriptor and the status. The ** call-in function should only be called when ALL requested @@ -198,11 +205,11 @@ typedef void (tGOEP_WRITE_CBACK) (tGOEP_FD fd, const void *p_data, INT16 size, ** Callback Function: tGOEP_SEEK_CBACK ** ** Description This function is executed by OBX profiles to Move a file pointer -** of a previously opened file to the specified location for the +** of a previously opened file to the specified location for the ** next read or write operation. ** ** Returns void -** +** *******************************************************************************/ typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8 app_id); @@ -223,7 +230,7 @@ typedef void (tGOEP_SEEK_CBACK) (tGOEP_FD fd, INT32 offset, INT16 origin, UINT8 ** event_id - event that must be passed into the call-in function. ** ** Returns void -** +** ** Note: Upon completion of the request, GOEP_DirentryRsp() is ** filled in entry and the status. ** GOEP_OK is returned when p_entry is valid, @@ -246,7 +253,7 @@ typedef void (tGOEP_DIRENTRY_CBACK) (const char *p_path, BOOLEAN first_item, ** [GOEP_OK if it exists] ** [GOEP_EACCES if permissions are wrong] ** [GOEP_FAIL if it does not exist] -** +** *******************************************************************************/ typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode, BOOLEAN *p_is_dir, UINT8 app_id); @@ -264,7 +271,7 @@ typedef tGOEP_STATUS (tGOEP_ACCESS_CBACK) (const char *p_path, UINT16 mode, ** Returns (tGOEP_STATUS) status of the call. ** [GOEP_OK if successful] ** [GOEP_FAIL if unsuccessful] -** +** *******************************************************************************/ typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id); @@ -282,7 +289,7 @@ typedef tGOEP_STATUS (tGOEP_MKDIR_CBACK) (const char *p_path, UINT8 app_id); ** [GOEP_EACCES if read-only] ** [GOEP_ENOTEMPTY if directory is not empty] ** [GOEP_FAIL otherwise] -** +** *******************************************************************************/ typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id); @@ -299,7 +306,7 @@ typedef tGOEP_STATUS (tGOEP_RMDIR_CBACK) (const char *p_path, UINT8 app_id); ** [GOEP_OK if successful] ** [GOEP_EACCES if read-only] ** [GOEP_FAIL otherwise] -** +** *******************************************************************************/ typedef tGOEP_STATUS (tGOEP_UNLINK_CBACK) (const char *p_path, UINT8 app_id); @@ -374,7 +381,7 @@ GOEP_API extern void GOEP_WriteRsp (tGOEP_FD fd, tGOEP_STATUS status, UINT16 eve ** GOEP_FAIL if any errors have occurred. ** event_id - event id as given in the tGOEP_DIRENTRY_CBACK function. ** -** Returns void +** Returns void ** *******************************************************************************/ GOEP_API extern void GOEP_DirentryRsp(tGOEP_STATUS status, UINT16 event_id); diff --git a/stack/include/hcidefs.h b/stack/include/hcidefs.h index c2ee429..1a0b3e8 100644 --- a/stack/include/hcidefs.h +++ b/stack/include/hcidefs.h @@ -1,13 +1,20 @@ -/***************************************************************************** -** -** Name hcidefs.h -** -** Function this file contains Host Controller Interface definitions -** -** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef HCIDEFS_H #define HCIDEFS_H @@ -22,7 +29,7 @@ #define HCI_PROTO_VERSION_2_1 0x04 /* Version for BT spec 2.1 [Lisbon] */ #define HCI_PROTO_VERSION_3_0 0x05 /* Version for BT spec 3.0 */ #define HCI_PROTO_REVISION 0x000C /* Current implementation version */ -/* +/* ** Definitions for HCI groups */ #define HCI_GRP_LINK_CONTROL_CMDS (0x01 << 10) /* 0x0400 */ @@ -205,7 +212,7 @@ #define HCI_SHORT_RANGE_MODE (0x006B | HCI_GRP_HOST_CONT_BASEBAND_CMDS) /* 802.11 only */ #define HCI_CONT_BASEBAND_CMDS_FIRST HCI_SET_EVENT_MASK -#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE +#define HCI_CONT_BASEBAND_CMDS_LAST HCI_SHORT_RANGE_MODE /* Commands of HCI_GRP_INFORMATIONAL_PARAMS group */ @@ -250,7 +257,7 @@ #define HCI_AMP_TEST_END (0x0008 | HCI_GRP_TESTING_CMDS) #define HCI_AMP_TEST (0x0009 | HCI_GRP_TESTING_CMDS) -#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE +#define HCI_TESTING_CMDS_FIRST HCI_READ_LOOPBACK_MODE #define HCI_TESTING_CMDS_LAST HCI_AMP_TEST #define HCI_VENDOR_CMDS_FIRST 0x0001 @@ -377,18 +384,18 @@ /* ULP HCI Event */ #define HCI_BLE_EVENT 0x03E /* ULP Event sub code */ -#define HCI_BLE_CONN_COMPLETE_EVT 0x01 -#define HCI_BLE_ADV_PKT_RPT_EVT 0x02 -#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03 +#define HCI_BLE_CONN_COMPLETE_EVT 0x01 +#define HCI_BLE_ADV_PKT_RPT_EVT 0x02 +#define HCI_BLE_LL_CONN_PARAM_UPD_EVT 0x03 #define HCI_BLE_READ_REMOTE_FEAT_CMPL_EVT 0x04 #define HCI_BLE_LTK_REQ_EVT 0x05 -#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT +#define HCI_EVENT_RSP_FIRST HCI_INQUIRY_COMP_EVT #define HCI_EVENT_RSP_LAST HCI_AMP_STATUS_CHANGE_EVT #define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */ #define HCI_NAP_TRACE_EVT 0xFF /* was define 0xFE, 0xFD, change to 0xFF - because conflict w/ TCI_EVT and per + because conflict w/ TCI_EVT and per specification compliant */ @@ -435,7 +442,7 @@ #define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23 #define HCI_ERR_LMP_PDU_NOT_ALLOWED 0x24 #define HCI_ERR_ENCRY_MODE_NOT_ACCEPTABLE 0x25 -#define HCI_ERR_UNIT_KEY_USED 0x26 +#define HCI_ERR_UNIT_KEY_USED 0x26 #define HCI_ERR_QOS_NOT_SUPPORTED 0x27 #define HCI_ERR_INSTANT_PASSED 0x28 #define HCI_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED 0x29 @@ -555,7 +562,7 @@ */ -/* +/* ** Definitions for packet type masks (BT1.2 and BT2.0 definitions) */ #define HCI_PKT_TYPES_MASK_NO_2_DH1 0x0002 @@ -581,7 +588,7 @@ && ((t) != 0)) - + /* Packet type should not be invalid and at least one should be specified */ @@ -604,7 +611,7 @@ | HCI_PKT_TYPES_MASK_DM5 \ | HCI_PKT_TYPES_MASK_DH5)) != 0)) -/* +/* ** Definitions for eSCO packet type masks (BT1.2 and BT2.0 definitions) */ #define HCI_ESCO_PKT_TYPES_MASK_HV1 0x0001 @@ -637,14 +644,14 @@ | HCI_ESCO_PKT_TYPES_MASK_EV5)) == 0)) \ && ((t) != 0)) -/* +/* ** Define parameters to allow role switch during create connection */ #define HCI_CR_CONN_NOT_ALLOW_SWITCH 0x00 #define HCI_CR_CONN_ALLOW_SWITCH 0x01 -/* -** Hold Mode command destination +/* +** Hold Mode command destination */ #define HOLD_MODE_DEST_LOCAL_DEVICE 0x00 #define HOLD_MODE_DEST_RMT_DEVICE 0x01 @@ -880,10 +887,10 @@ #define HCI_CVSD_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_CVSD) #define HCI_U_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_U_LAW) #define HCI_A_LAW_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_A_LAW) -#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT) +#define HCI_TRANSPNT_SUPPORTED(x) (((x) & HCI_AIR_CODING_FORMAT_MASK) == HCI_AIR_CODING_FORMAT_TRANSPNT) /* Retransmit timer definitions in 0.625 */ -#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF +#define HCI_MAX_AUTO_FLUSH_TOUT 0x07FF #define HCI_DEFAULT_AUTO_FLUSH_TOUT 0 /* No auto flush */ /* Broadcast retransmitions */ @@ -1002,7 +1009,7 @@ typedef struct #define HCI_BRCM_ACL_PRIORITY_HIGH 0xFF #define HCI_BRCM_SET_ACL_PRIORITY (0x0057 | HCI_GRP_VENDOR_SPECIFIC) -/* Define values for LMP Test Control parameters +/* Define values for LMP Test Control parameters ** Test Scenario, Hopping Mode, Power Control Mode */ #define LMP_TESTCTL_TESTSC_PAUSE 0 @@ -1028,12 +1035,12 @@ typedef struct #define LMP_TESTCTL_POWCTL_ADAPTIVE 1 -/* +/* ** Define company IDs (from Bluetooth Assigned Numbers v1.1, section 2.2) */ #define LMP_COMPID_ERICSSON 0 #define LMP_COMPID_NOKIA 1 -#define LMP_COMPID_INTEL 2 +#define LMP_COMPID_INTEL 2 #define LMP_COMPID_IBM 3 #define LMP_COMPID_TOSHIBA 4 #define LMP_COMPID_3COM 5 @@ -1121,9 +1128,9 @@ typedef struct #define LMP_COMPID_HARMON_INTL_IND 87 #define LMP_COMPID_VIZIO 88 #define LMP_COMPID_NORDIC SEMI 89 -#define LMP_COMPID_EM MICRO 90 +#define LMP_COMPID_EM MICRO 90 #define LMP_COMPID_RALINK TECH 91 -#define LMP_COMPID_BELKIN INC 92 +#define LMP_COMPID_BELKIN INC 92 #define LMP_COMPID_REALTEK SEMI 93 #define LMP_COMPID_STONESTREET ONE 94 #define LMP_COMPID_WICENTRIC 95 @@ -1131,7 +1138,7 @@ typedef struct #define LMP_COMPID_RDA MICRO 97 #define LMP_COMPID_GIBSON GUITARS 98 #define LMP_COMPID_MICOMMAND INC 99 -#define LMP_COMPID_BAND XI 100 +#define LMP_COMPID_BAND XI 100 #define LMP_COMPID_HP COMPANY 101 #define LMP_COMPID_9SOLUTIONS OY 102 #define LMP_COMPID_GN NETCOM 103 @@ -1140,8 +1147,8 @@ typedef struct #define LMP_COMPID_MINDTREE LTD 106 #define LMP_COMPID_POLAR ELECTRO 107 #define LMP_COMPID_BEAUTIFUL ENTERPRISE 108 -#define LMP_COMPID_BRIARTEK 109 -#define LMP_COMPID_SUMMIT DATA COMM 110 +#define LMP_COMPID_BRIARTEK 109 +#define LMP_COMPID_SUMMIT DATA COMM 110 #define LMP_COMPID_SOUND ID 111 #define LMP_COMPID_MONSTER LLC 112 #define LMP_COMPID_CONNECTBLU 113 @@ -1196,7 +1203,7 @@ typedef struct #define HCI_EDR3_DH3_PACKET_SIZE 552 #define HCI_EDR3_DH5_PACKET_SIZE 1021 -/* +/* ** Features encoding - page 0 */ #define HCI_NUM_FEATURE_BYTES 8 @@ -1434,14 +1441,14 @@ typedef struct #define HCI_FEATURE_EXTENDED_OFF 7 #define HCI_LMP_EXTENDED_SUPPORTED(x) ((x)[HCI_FEATURE_EXTENDED_OFF] & HCI_FEATURE_EXTENDED_MASK) -/* +/* ** Features encoding - page 1 */ #define HCI_EXT_FEATURE_SSP_HOST_MASK 0x01 #define HCI_EXT_FEATURE_SSP_HOST_OFF 0 #define HCI_SSP_HOST_SUPPORTED(x) ((x)[HCI_EXT_FEATURE_SSP_HOST_OFF] & HCI_EXT_FEATURE_SSP_HOST_MASK) -/* +/* ** Local Supported Commands encoding */ #define HCI_NUM_SUPP_COMMANDS_BYTES 64 @@ -2161,15 +2168,15 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator #define LM_HOLD_MODE (0x00DC | HCI_GRP_VENDOR_SPECIFIC) #define LM_EXIT_PARK_MODE (0x00DD | HCI_GRP_VENDOR_SPECIFIC) -#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC) -#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC) -#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC) -#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_SCO_LINK_REQUEST (0x00E0 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_SCO_CHANGE (0x00E4 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_SCO_REMOVE (0x00E8 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_MAX_SLOTS (0x00F1 | HCI_GRP_VENDOR_SPECIFIC) #define LM_MAX_SLOTS_REQUEST (0x00F2 | HCI_GRP_VENDOR_SPECIFIC) #ifdef INCLUDE_OPTIONAL_PAGING_SCHEME -#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC) -#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_OPTIONAL_PAGE_REQUEST (0x00F3 | HCI_GRP_VENDOR_SPECIFIC) +#define LM_OPTIONAL_PAGESCAN_REQUEST (0x00F4 | HCI_GRP_VENDOR_SPECIFIC) #endif #define LM_SETUP_COMPLETE (0x00FF | HCI_GRP_VENDOR_SPECIFIC) @@ -2194,7 +2201,7 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator #define LM_HIST_HCI_UPDATA (0x0110 | HCI_GRP_VENDOR_SPECIFIC) #define LM_HIST_HCI_DNDATA (0x0111 | HCI_GRP_VENDOR_SPECIFIC) -#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC) +#define HCI_ENTER_TEST_MODE (0x0300 | HCI_GRP_VENDOR_SPECIFIC) #define HCI_LMP_TEST_CNTRL (0x0301 | HCI_GRP_VENDOR_SPECIFIC) #define HCI_DEBUG_LC_CMD_MIN (0x0300 | HCI_GRP_VENDOR_SPECIFIC) #define HCI_DEBUG_LC_CMD_MAX (0x03FF | HCI_GRP_VENDOR_SPECIFIC) @@ -2223,4 +2230,4 @@ Commands of HCI_GRP_VENDOR_SPECIFIC group for WIDCOMM SW LM Simulator #endif - + diff --git a/stack/include/hcimsgs.h b/stack/include/hcimsgs.h index 5cfdcc2..3a23dbe 100644 --- a/stack/include/hcimsgs.h +++ b/stack/include/hcimsgs.h @@ -1,14 +1,20 @@ -/***************************************************************************** -** -** Name hcimsgs.h -** -** Function this file defines Host Controller Interface messages -** -** -** Copyright (c) 1999-2011, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef HCIMSGS_H #define HCIMSGS_H @@ -23,7 +29,7 @@ extern "C" { #endif /* Message by message.... */ - + #define HCIC_GET_UINT8(p, off) (UINT8)(*((UINT8 *)((p) + 1) + p->offset + 3 + (off))) #define HCIC_GET_UINT16(p, off) (UINT16)((*((UINT8 *)((p) + 1) + p->offset + 3 + (off)) + \ @@ -77,7 +83,7 @@ HCI_API extern BOOLEAN btsnd_hcic_inquiry(const LAP inq_lap, UINT8 duration, #define HCIC_INQ_DUR_OFF 3 #define HCIC_INQ_RSP_CNT_OFF 4 /* Inquiry */ - + /* Inquiry Cancel */ HCI_API extern BOOLEAN btsnd_hcic_inq_cancel(void); @@ -104,7 +110,7 @@ HCI_API extern BOOLEAN btsnd_hcic_exit_per_inq(void); /* Create Connection */ HCI_API extern BOOLEAN btsnd_hcic_create_conn(BD_ADDR dest, UINT16 packet_types, UINT8 page_scan_rep_mode, - UINT8 page_scan_mode, + UINT8 page_scan_mode, UINT16 clock_offset, UINT8 allow_switch); @@ -184,7 +190,7 @@ HCI_API extern BOOLEAN btsnd_hcic_link_key_neg_reply (BD_ADDR bd_addr); /* PIN Code Request Reply */ HCI_API extern BOOLEAN btsnd_hcic_pin_code_req_reply (BD_ADDR bd_addr, - UINT8 pin_code_len, + UINT8 pin_code_len, PIN_CODE pin_code); #define HCIC_PARAM_SIZE_PIN_CODE_REQ_REPLY 23 @@ -406,7 +412,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_policy_set(UINT16 handle, UINT16 setting /* Write Policy Settings */ /* Read Default Policy Settings */ -HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void); +HCI_API extern BOOLEAN btsnd_hcic_read_def_policy_set(void); #define HCIC_PARAM_SIZE_READ_DEF_POLICY_SET 0 /* Read Default Policy Settings */ @@ -464,7 +470,7 @@ HCI_API extern BOOLEAN btsnd_hcic_sniff_sub_rate(UINT16 handle, UINT16 max_lat, /* Extended Inquiry Response */ #if (BTM_EIR_SERVER_INCLUDED == TRUE) -HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req); +HCI_API extern void btsnd_hcic_write_ext_inquiry_response(void *buffer, UINT8 fec_req); #define HCIC_PARAM_SIZE_EXT_INQ_RESP 241 @@ -478,7 +484,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_ext_inquiry_response(void); /* Read Ext #endif /* Write Simple Pairing Mode */ /**** Simple Pairing Commands ****/ -HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode); +HCI_API extern BOOLEAN btsnd_hcic_write_simple_pairing_mode(UINT8 mode); #define HCIC_PARAM_SIZE_W_SIMP_PAIR 1 @@ -490,7 +496,7 @@ HCI_API extern BOOLEAN btsnd_hcic_read_simple_pairing_mode (void); #define HCIC_PARAM_SIZE_R_SIMP_PAIR 0 /* Write Simple Pairing Debug Mode */ -HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode); +HCI_API extern BOOLEAN btsnd_hcic_write_simp_pair_debug_mode(UINT8 debug_mode); #define HCIC_PARAM_SIZE_SIMP_PAIR_DBUG 1 @@ -506,7 +512,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_reply (BD_ADDR bd_addr, UINT8 capab #define HCI_IO_CAPABILITY_OFF 6 #define HCI_IO_CAP_OOB_DATA_OFF 7 #define HCI_IO_CAP_AUTH_REQ_OFF 8 - + /* IO Capabilities Req Neg Reply */ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 err_code); @@ -514,7 +520,7 @@ HCI_API extern BOOLEAN btsnd_hcic_io_cap_req_neg_reply (BD_ADDR bd_addr, UINT8 e #define HCI_IO_CAP_NR_BD_ADDR_OFF 0 #define HCI_IO_CAP_NR_ERR_CODE 6 - + /* Read Local OOB Data */ HCI_API extern BOOLEAN btsnd_hcic_read_local_oob_data (void); @@ -527,21 +533,21 @@ HCI_API extern BOOLEAN btsnd_hcic_user_conf_reply (BD_ADDR bd_addr, BOOLEAN is_y #define HCI_USER_CONF_BD_ADDR_OFF 0 - + HCI_API extern BOOLEAN btsnd_hcic_user_passkey_reply (BD_ADDR bd_addr, UINT32 value); #define HCIC_PARAM_SIZE_U_PKEY_REPLY 10 #define HCI_USER_PASSKEY_BD_ADDR_OFF 0 #define HCI_USER_PASSKEY_VALUE_OFF 6 - + HCI_API extern BOOLEAN btsnd_hcic_user_passkey_neg_reply (BD_ADDR bd_addr); #define HCIC_PARAM_SIZE_U_PKEY_NEG_REPLY 6 #define HCI_USER_PASSKEY_NEG_BD_ADDR_OFF 0 - + /* Remote OOB Data Request Reply */ HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c, UINT8 *p_r); @@ -551,32 +557,32 @@ HCI_API extern BOOLEAN btsnd_hcic_rem_oob_reply (BD_ADDR bd_addr, UINT8 *p_c, #define HCI_REM_OOB_DATA_BD_ADDR_OFF 0 #define HCI_REM_OOB_DATA_C_OFF 6 #define HCI_REM_OOB_DATA_R_OFF 22 - + /* Remote OOB Data Request Negative Reply */ HCI_API extern BOOLEAN btsnd_hcic_rem_oob_neg_reply (BD_ADDR bd_addr); #define HCIC_PARAM_SIZE_REM_OOB_NEG_REPLY 6 #define HCI_REM_OOB_DATA_NEG_BD_ADDR_OFF 0 - + /* Read Tx Power Level */ HCI_API extern BOOLEAN btsnd_hcic_read_inq_tx_power (void); #define HCIC_PARAM_SIZE_R_TX_POWER 0 /* Write Tx Power Level */ -HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level); +HCI_API extern BOOLEAN btsnd_hcic_write_inq_tx_power (INT8 level); #define HCIC_PARAM_SIZE_W_TX_POWER 1 #define HCIC_WRITE_TX_POWER_LEVEL_OFF 0 - /* Read Default Erroneous Data Reporting */ + /* Read Default Erroneous Data Reporting */ HCI_API extern BOOLEAN btsnd_hcic_read_default_erroneous_data_rpt (void); #define HCIC_PARAM_SIZE_R_ERR_DATA_RPT 0 /* Write Default Erroneous Data Reporting */ -HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level); +HCI_API extern BOOLEAN btsnd_hcic_write_default_erroneous_data_rpt (UINT8 level); #define HCIC_PARAM_SIZE_W_ERR_DATA_RPT 1 @@ -729,7 +735,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_pagescan_cfg(UINT16 interval, HCI_API extern BOOLEAN btsnd_hcic_read_inqscan_cfg(void); /* Read Inquiry Scan Activity */ /* Write Inquiry Scan Activity */ -HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window); +HCI_API extern BOOLEAN btsnd_hcic_write_inqscan_cfg(UINT16 interval, UINT16 window); #define HCIC_PARAM_SIZE_WRITE_INQSCAN_CFG 4 @@ -786,7 +792,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_sco_flow_enable(UINT8 flag); /* Set Host Buffer Size */ HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, - UINT8 sco_len, + UINT8 sco_len, UINT16 acl_num, UINT16 sco_num); @@ -797,7 +803,7 @@ HCI_API extern BOOLEAN btsnd_hcic_set_host_buf_size (UINT16 acl_len, #define HCI_HOST_BUF_SIZE_ACL_NUM_OFF 3 #define HCI_HOST_BUF_SIZE_SCO_NUM_OFF 5 - + HCI_API extern BOOLEAN btsnd_hcic_host_num_xmitted_pkts (UINT8 num_handles, UINT16 *handle, UINT16 *num_pkts); /* Set Host Buffer Size */ @@ -889,7 +895,7 @@ HCI_API extern BOOLEAN btsnd_hcic_write_afh_channel_assessment_mode (UINT8 mode) HCI_API extern BOOLEAN btsnd_hcic_set_afh_host_channel_class (UINT8 *p_afhchannelmap); HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_assessment_mode(void); HCI_API extern BOOLEAN btsnd_hcic_read_afh_channel_map (UINT16 handle); -HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */ +HCI_API extern BOOLEAN btsnd_hcic_nop(void); /* NOP */ /* Send HCI Data */ HCI_API extern void btsnd_hcic_data (BT_HDR *p_buf, UINT16 len, UINT16 handle, UINT8 boundary, UINT8 broadcast); @@ -935,13 +941,13 @@ HCI_API extern void btsnd_hcie_inq_comp(void *buffer, UINT8 status); #define HCIE_PARAM_SIZE_INQ_COMP 1 /* Inquiry Response Event */ -HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr, - UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode, - UINT8 *page_scan_mode, UINT8 **dev_class, +HCI_API extern void btsnd_hcie_inq_res(void *buffer, UINT8 num_resp, UINT8 **bd_addr, + UINT8 *page_scan_rep_mode, UINT8 *page_scan_per_mode, + UINT8 *page_scan_mode, UINT8 **dev_class, UINT16 *clock_offset); /* Connection Complete Event */ -HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle, +HCI_API extern void btsnd_hcie_connection_comp(void *buffer, UINT8 status, UINT16 handle, BD_ADDR bd_addr, UINT8 link_type, UINT8 encr_mode); #define HCIE_PARAM_SIZE_CONNECTION_COMP 11 @@ -1029,16 +1035,16 @@ HCI_API extern void btsnd_hcie_read_rmt_version (void *buffer, UINT8 status, UIN /* QOS setup complete */ -HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags, - UINT8 service_type, UINT32 token_rate, UINT32 peak, +HCI_API extern void btsnd_hcie_qos_setup_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags, + UINT8 service_type, UINT32 token_rate, UINT32 peak, UINT32 latency, UINT32 delay_var); #define HCIE_PARAM_SIZE_QOS_SETUP_COMP 21 /* Flow Specification complete */ -HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags, - UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size, +HCI_API extern void btsnd_hcie_flow_spec_compl (void *buffer, UINT8 status, UINT16 handle, UINT8 flags, + UINT8 flow_direction, UINT8 service_type, UINT32 token_rate, UINT32 token_bucket_size, UINT32 peak, UINT32 latency); #define HCIE_PARAM_SIZE_FLOW_SPEC_COMP 22 @@ -1057,20 +1063,20 @@ HCI_API extern void btsnd_hcie_cmd_comp_params (void *buffer, UINT8 max_host_cmd /* Command Complete Event with 1-byte param */ -HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode, +HCI_API extern void btsnd_hcie_cmd_comp_param1(void *buffer, UINT8 max_host_cmds, UINT16 opcode, UINT8 status, UINT8 param1); #define HCIE_PARAM_SIZE_CMD_COMP_PARAM1 5 /* Command Complete Event with 2-byte param */ -HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode, +HCI_API extern void btsnd_hcie_cmd_comp_param2(void *buffer, UINT8 max_host_cmds, UINT16 opcode, UINT8 status, UINT16 param2); #define HCIE_PARAM_SIZE_CMD_COMP_PARAM2 6 /* Command Complete Event with BD-addr as param */ -HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode, +HCI_API extern void btsnd_hcie_cmd_comp_bd_addr(void *buffer, UINT8 max_host_cmds, UINT16 opcode, UINT8 status, BD_ADDR bd_addr); #define HCIE_PARAM_SIZE_CMD_COMP_BD_ADDR 10 @@ -1107,7 +1113,7 @@ HCI_API extern void btsnd_hcie_num_compl_pkts (void *buffer, UINT8 num_handles, /* Mode Change Event */ -HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle, +HCI_API extern void btsnd_hcie_mode_change (void *buffer, UINT8 status, UINT16 handle, UINT8 mode, UINT16 interval); #define HCIE_PARAM_SIZE_MODE_CHANGE 6 @@ -1165,7 +1171,7 @@ HCI_API extern void btsnd_hcie_max_slots_change(void *buffer, UINT16 handle, UIN /* Read Clock Offset Complet Event */ -HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle, +HCI_API extern void btsnd_hcie_read_clock_off_comp(void *buffer, UINT8 status, UINT16 handle, UINT16 clock_offset); #define HCIE_PARAM_SIZE_READ_CLOCK_OFF_COMP 5 @@ -1199,7 +1205,7 @@ HCI_API extern void btsnd_hcie_pagescan_rep_mode_chng (void *buffer, BD_ADDR bd_ /* Sniff Sub Rate Event */ -HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat, +HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 handle, UINT16 max_tx_lat, UINT16 max_rx_lat, UINT16 min_remote_timeout, UINT16 min_local_timeout); #define HCIE_PARAM_SIZE_SNIFF_SUB_RATE 11 @@ -1207,8 +1213,8 @@ HCI_API extern void btsnd_hcie_sniff_sub_rate(void *buffer, UINT8 status, UINT16 /* Extended Inquiry Result Event */ -HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr, - UINT8 *page_scan_rep_mode, UINT8 *reserved, +HCI_API extern void btsnd_hcie_ext_inquiry_result(void *buffer, UINT8 num_resp, UINT8 **bd_addr, + UINT8 *page_scan_rep_mode, UINT8 *reserved, UINT8 **dev_class, UINT16 *clock_offset, UINT8 *rssi, UINT8 *p_data); @@ -1257,7 +1263,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_local_used_feat (UINT8 feat_set[8]); HCI_API extern BOOLEAN btsnd_hcic_ble_set_random_addr (BD_ADDR random_addr); -HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max, +HCI_API extern BOOLEAN btsnd_hcic_ble_write_adv_params (UINT16 adv_int_min, UINT16 adv_int_max, UINT8 adv_type, UINT8 addr_type_own, UINT8 addr_type_dir, BD_ADDR direct_bda, UINT8 channel_map, UINT8 adv_filter_policy); @@ -1270,13 +1276,13 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_rsp_data (UINT8 data_len, UINT8 * HCI_API extern BOOLEAN btsnd_hcic_ble_set_adv_enable (UINT8 adv_enable); -HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type, - UINT16 scan_int, UINT16 scan_win, +HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_params (UINT8 scan_type, + UINT16 scan_int, UINT16 scan_win, UINT8 addr_type, UINT8 scan_filter_policy); HCI_API extern BOOLEAN btsnd_hcic_ble_set_scan_enable (UINT8 scan_enable, UINT8 duplicate); -HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win, +HCI_API extern BOOLEAN btsnd_hcic_ble_create_ll_conn (UINT16 scan_int, UINT16 scan_win, UINT8 init_filter_policy, UINT8 addr_type_peer, BD_ADDR bda_peer, UINT8 addr_type_own, UINT16 conn_int_min, UINT16 conn_int_max, UINT16 conn_latency, UINT16 conn_timeout, UINT16 min_ce_len, UINT16 max_ce_len); @@ -1304,7 +1310,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_encrypt (UINT8* key, UINT8 key_len, UINT8* HCI_API extern BOOLEAN btsnd_hcic_ble_rand (void *p_cmd_cplt_cback); -HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle, +HCI_API extern BOOLEAN btsnd_hcic_ble_start_enc ( UINT16 handle, UINT8 rand[HCIC_BLE_RAND_DI_SIZE], UINT16 ediv, UINT8 ltk[HCIC_BLE_ENCRYT_KEY_SIZE]); @@ -1314,7 +1320,7 @@ HCI_API extern BOOLEAN btsnd_hcic_ble_ltk_req_neg_reply (UINT16 handle); HCI_API extern BOOLEAN btsnd_hcic_ble_read_supported_states (void); - + #endif /* BLE_INCLUDED */ #ifdef __cplusplus diff --git a/stack/include/hiddefs.h b/stack/include/hiddefs.h index 7d8e75a..e29a4c4 100644 --- a/stack/include/hiddefs.h +++ b/stack/include/hiddefs.h @@ -1,14 +1,26 @@ -/****************************************************************************/ -/* */ -/* Name: hiddefs.h */ -/* */ -/* Function: this file contains HID protocol definitions */ -/* */ -/* */ -/* Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved. */ -/* WIDCOMM Bluetooth Core. Proprietary and confidential. */ -/* */ -/****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2002-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains HID protocol definitions + * + ******************************************************************************/ #ifndef HIDDEFS_H #define HIDDEFS_H @@ -100,7 +112,7 @@ typedef UINT8 tHID_STATUS; */ /* Buffer size in two bytes after Report ID */ -#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08) +#define HID_PAR_GET_REP_BUFSIZE_FOLLOWS (0x08) /* Parameters for Protocol Type @@ -137,7 +149,7 @@ typedef struct sdp_info UINT8 ctry_code; /*Country Code.*/ UINT16 sup_timeout;/* Supervisory Timeout */ - tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record. + tHID_DEV_DSCP_INFO dscp_info; /* Descriptor list and Report list to be set in the SDP record. This parameter is used if HID_DEV_USE_GLB_SDP_REC is set to FALSE.*/ tSDP_DISC_REC *p_sdp_layer_rec; } tHID_DEV_SDP_INFO; diff --git a/stack/include/hidh_api.h b/stack/include/hidh_api.h index bc3f8c8..4662630 100644 --- a/stack/include/hidh_api.h +++ b/stack/include/hidh_api.h @@ -1,13 +1,20 @@ -/**************************************************************************** -** -** Name: hidh_api.h -** -** Function: this file contains HID HOST side API definitions -** -** Copyright (c) 2002-2004, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2002-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef HIDH_API_H #define HIDH_API_H @@ -42,15 +49,15 @@ enum { *****************************************************************************/ typedef void (tHID_HOST_SDP_CALLBACK) (UINT16 result, UINT16 attr_mask, - tHID_DEV_SDP_INFO *sdp_rec ); + tHID_DEV_SDP_INFO *sdp_rec ); /* HID-HOST returns the events in the following table to the application via tHID_HOST_DEV_CALLBACK -HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state. +HID_HDEV_EVT_OPEN Connected to device with Interrupt and Control Channels in OPEN state. Data = NA HID_HDEV_EVT_CLOSE Connection with device is closed. Data=reason code. -HID_HDEV_EVT_RETRYING Lost connection is being re-connected. +HID_HDEV_EVT_RETRYING Lost connection is being re-connected. Data=Retrial number -HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR +HID_HDEV_EVT_IN_REPORT Device sent an input report Data=Report Type pdata= pointer to BT_HDR (GKI buffer having report data.) HID_HDEV_EVT_HANDSHAKE Device sent SET_REPORT Data=Result-code pdata=NA. HID_HDEV_EVT_VC_UNPLUG Device sent Virtual Unplug Data=NA. pdata=NA. @@ -69,7 +76,7 @@ enum HID_HDEV_EVT_VC_UNPLUG }; typedef void (tHID_HOST_DEV_CALLBACK) (UINT8 dev_handle, - UINT8 event, /* Event from HID-DEVICE. */ + UINT8 event, /* Event from HID-DEVICE. */ UINT32 data, /* Integer data corresponding to the event.*/ BT_HDR *p_buf ); /* Pointer data corresponding to the event. */ diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h index fbd45d8..618ea8d 100644 --- a/stack/include/l2c_api.h +++ b/stack/include/l2c_api.h @@ -1,14 +1,26 @@ -/***************************************************************************** -** -** Name: l2c_api.h -** -** Description: this file contains the L2CAP API definitions -** -** -** -** Copyright (c) 1999-2009, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * this file contains the L2CAP API definitions + * + ******************************************************************************/ #ifndef L2C_API_H #define L2C_API_H @@ -75,18 +87,18 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE; /* length of the HCI header block */ /* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) */ -#define L2CAP_MULTI_AV_HCI_HDR_LEN 8 +#define L2CAP_MULTI_AV_HCI_HDR_LEN 8 /* length of padding for 4 bytes align */ #define L2CAP_MULTI_AV_PADDING_LEN 2 /* length of the HCI header block with padding for FCR */ /* HCI header(4) + SNK count(1) + FCR bits(1) + AV data length(2) + padding(2) */ -#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10 +#define L2CAP_MULTI_AV_HCI_HDR_LEN_WITH_PADDING 10 /* length of the L2CAP header block */ /* HCI header(4) + L2CAP header(4) + padding(4) or control word(2) + FCS(2) */ -#define L2CAP_MULTI_AV_L2C_HDR_LEN 12 +#define L2CAP_MULTI_AV_L2C_HDR_LEN 12 /* definition used for L2CA_SetDesireRole */ #define L2CAP_ROLE_SLAVE HCI_ROLE_SLAVE @@ -107,7 +119,7 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE; /* Validity check for PSM. PSM values must be odd. Also, all PSM values must ** be assigned such that the least significant bit of the most sigificant ** octet equals zero. -*/ +*/ #define L2C_INVALID_PSM(psm) (((psm) & 0x0101) != 0x0001) #define L2C_IS_VALID_PSM(psm) (((psm) & 0x0101) == 0x0001) @@ -261,7 +273,7 @@ typedef void (tL2CA_ECHO_DATA_CB) (BD_ADDR, UINT16, UINT8 *); typedef void (tL2CA_CONGESTION_STATUS_CB) (UINT16, BOOLEAN); /* Callback prototype for number of packets completed events. -** This callback notifies the application when Number of Completed Packets +** This callback notifies the application when Number of Completed Packets ** event has been received. ** This callback is originally designed for 3DG devices. ** The parameter is: @@ -366,7 +378,7 @@ L2C_API extern void L2CA_Deregister (UINT16 psm); ** Description Other layers call this function to find an unused PSM for L2CAP ** services. ** -** Returns PSM to use. +** Returns PSM to use. ** *******************************************************************************/ L2C_API extern UINT16 L2CA_AllocatePSM(void); @@ -427,7 +439,7 @@ L2C_API extern UINT16 L2CA_ErtmConnectReq (UINT16 psm, BD_ADDR p_bd_addr, ** Returns TRUE for success, FALSE for failure ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, +L2C_API extern BOOLEAN L2CA_ErtmConnectRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 result, UINT16 status, tL2CAP_ERTM_INFO *p_ertm_info); @@ -469,7 +481,7 @@ L2C_API extern BOOLEAN L2CA_DisconnectReq (UINT16 cid); ** ** Function L2CA_DisconnectRsp ** -** Description Higher layers call this function to acknowledge the +** Description Higher layers call this function to acknowledge the ** disconnection of a channel. ** ** Returns void @@ -536,18 +548,18 @@ L2C_API extern BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, ** Function L2CA_SetIdleTimeoutByBdAddr ** ** Description Higher layers call this function to set the idle timeout for -** a connection. The "idle timeout" is the amount of time that -** a connection can remain up with no L2CAP channels on it. -** A timeout of zero means that the connection will be torn -** down immediately when the last channel is removed. -** A timeout of 0xFFFF means no timeout. Values are in seconds. -** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY, -** then the idle timeouts for all active l2cap links will be +** a connection. The "idle timeout" is the amount of time that +** a connection can remain up with no L2CAP channels on it. +** A timeout of zero means that the connection will be torn +** down immediately when the last channel is removed. +** A timeout of 0xFFFF means no timeout. Values are in seconds. +** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY, +** then the idle timeouts for all active l2cap links will be ** changed. ** ** Returns TRUE if command succeeded, FALSE if failed ** -** NOTE This timeout applies to all logical channels active on the +** NOTE This timeout applies to all logical channels active on the ** ACL link. *******************************************************************************/ L2C_API extern BOOLEAN L2CA_SetIdleTimeoutByBdAddr(BD_ADDR bd_addr, UINT16 timeout); @@ -690,21 +702,21 @@ typedef void (tL2CA_RESERVE_CMPL_CBACK) (void); ** ** Function L2CA_SetFlushTimeout ** -** Description This function set the automatic flush time out in Baseband +** Description This function set the automatic flush time out in Baseband ** for ACL-U packets. ** BdAddr : the remote BD address of ACL link. If it is BT_DB_ANY ** then the flush time out will be applied to all ACL link. ** FlushTimeout: flush time out in ms -** 0x0000 : No automatic flush -** L2CAP_NO_RETRANSMISSION : No retransmission -** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5) +** 0x0000 : No automatic flush +** L2CAP_NO_RETRANSMISSION : No retransmission +** 0x0002 - 0xFFFE : flush time out, if (flush_tout*8)+3/5) ** <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot). ** Otherwise, return FALSE. -** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush +** L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush ** ** Returns TRUE if command succeeded, FALSE if failed ** -** NOTE This flush timeout applies to all logical channels active on the +** NOTE This flush timeout applies to all logical channels active on the ** ACL link. *******************************************************************************/ L2C_API extern BOOLEAN L2CA_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout); @@ -730,7 +742,7 @@ L2C_API extern UINT8 L2CA_DataWriteEx (UINT16 cid, BT_HDR *p_data, UINT16 flags) ** ** Function L2CA_SetChnlFlushability ** -** Description Higher layers call this function to set a channels +** Description Higher layers call this function to set a channels ** flushability flags ** ** Returns TRUE if CID found, else FALSE @@ -854,7 +866,7 @@ L2C_API extern BOOLEAN L2CA_UcdDeregister ( UINT16 psm ); ** Parameters: PSM ** BD_ADDR of remote device ** info_type : L2CAP_UCD_INFO_TYPE_RECEPTION -** L2CAP_UCD_INFO_TYPE_MTU +** L2CAP_UCD_INFO_TYPE_MTU ** ** ** Return value: TRUE if successs @@ -870,7 +882,7 @@ L2C_API extern BOOLEAN L2CA_UcdDiscover ( UINT16 psm, BD_ADDR rem_bda, UINT8 inf ** ** Parameters: PSM ** BD Address of remote -** Pointer to buffer of type BT_HDR +** Pointer to buffer of type BT_HDR ** flags : L2CAP_FLUSHABLE_CH_BASED ** L2CAP_FLUSHABLE_PKT ** L2CAP_NON_FLUSHABLE_PKT @@ -975,7 +987,7 @@ L2C_API extern BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR bd_addr) ** ** Parameters: Fixed CID ** BD Address of remote -** Pointer to buffer of type BT_HDR +** Pointer to buffer of type BT_HDR ** ** Return value L2CAP_DW_SUCCESS, if data accepted ** L2CAP_DW_FAILED, if error @@ -1005,11 +1017,11 @@ L2C_API extern BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda); ** Description Higher layers call this function to set the idle timeout for ** a fixed channel. The "idle timeout" is the amount of time that ** a connection can remain up with no L2CAP channels on it. -** A timeout of zero means that the connection will be torn -** down immediately when the last channel is removed. -** A timeout of 0xFFFF means no timeout. Values are in seconds. -** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY, -** then the idle timeouts for all active l2cap links will be +** A timeout of zero means that the connection will be torn +** down immediately when the last channel is removed. +** A timeout of 0xFFFF means no timeout. Values are in seconds. +** A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY, +** then the idle timeouts for all active l2cap links will be ** changed. ** ** Returns TRUE if command succeeded, FALSE if failed @@ -1032,7 +1044,7 @@ L2C_API extern BOOLEAN L2CA_SetFixedChannelTout (BD_ADDR rem_bda, UINT16 fixed_c ** Returns TRUE if successful ** *******************************************************************************/ -L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid, +L2C_API extern BOOLEAN L2CA_GetCurrentConfig (UINT16 lcid, tL2CAP_CFG_INFO **pp_our_cfg, tL2CAP_CH_CFG_BITS *p_our_cfg_bits, tL2CAP_CFG_INFO **pp_peer_cfg, tL2CAP_CH_CFG_BITS *p_peer_cfg_bits); diff --git a/stack/include/l2cdefs.h b/stack/include/l2cdefs.h index b2740cd..fe41476 100644 --- a/stack/include/l2cdefs.h +++ b/stack/include/l2cdefs.h @@ -1,15 +1,20 @@ -/**************************************************************************** -** -** Name: l2cdefs.h -** -** Function: This file contains L2CAP protocol definitions -** -** -** -** Copyright (c) 1999-2009, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef L2CDEFS_H #define L2CDEFS_H @@ -203,7 +208,7 @@ #define L2CAP_INFO_RESP_RESULT_SUCCESS 0 #define L2CAP_INFO_RESP_RESULT_NOT_SUPPORTED 1 -/* Define the info-type fields of information request & response +/* Define the info-type fields of information request & response */ #define L2CAP_CONNLESS_MTU_INFO_TYPE 0x0001 #define L2CAP_EXTENDED_FEATURES_INFO_TYPE 0x0002 /* Used in Information Req/Response */ @@ -249,7 +254,7 @@ #define L2CAP_MAX_HEADER_FCS (L2CAP_PKT_OVERHEAD + L2CAP_EXT_CONTROL_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN) /* length(2), channel(2), control(4), SDU length(2) FCS(2) */ /* Part of L2CAP_MIN_OFFSET that is not part of L2CAP -*/ +*/ #define L2CAP_OFFSET_WO_L2HDR (L2CAP_MIN_OFFSET-(L2CAP_PKT_OVERHEAD+L2CAP_FCR_OVERHEAD)) /* SAR bits in the control word diff --git a/stack/include/mca_api.h b/stack/include/mca_api.h index 4ac2c89..d455e5b 100644 --- a/stack/include/mca_api.h +++ b/stack/include/mca_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: mca_api.h -** -** Description: This interface file contains the interface to the -** Multi-Channel Adaptation Protocol (MCAP). -** -** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2009-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This interface file contains the interface to the Multi-Channel + * Adaptation Protocol (MCAP). + * + ******************************************************************************/ #ifndef MCA_API_H #define MCA_API_H @@ -72,7 +85,7 @@ typedef UINT8 tMCA_DEP; /* the handle for MCA_CreateDep. This is also the lo typedef UINT16 tMCA_DL; /* the handle for the data channel. This is reported at MCA_OPEN_CFM_EVT or MCA_OPEN_IND_EVT */ /* This is the data callback function. It is executed when MCAP has a data -** packet ready for the application. +** packet ready for the application. */ typedef void (tMCA_DATA_CBACK)(tMCA_DL mdl, BT_HDR *p_pkt); @@ -195,7 +208,7 @@ typedef union { } tMCA_CTRL; /* This is the control callback function. This function passes control events -** to the application. +** to the application. */ typedef void (tMCA_CTRL_CBACK)(tMCA_HANDLE handle, tMCA_CL mcl, UINT8 event, tMCA_CTRL *p_data); @@ -244,7 +257,7 @@ MCA_API extern UINT8 MCA_SetTraceLevel (UINT8 level); ** It is assumed that the control channel PSM and data channel ** PSM are not used by any other instances of the stack. ** If the given p_reg->ctrl_psm is 0, this handle is INT only. -** +** ** Returns 0, if failed. Otherwise, the MCA handle. ** *******************************************************************************/ @@ -270,7 +283,7 @@ MCA_API extern void MCA_Deregister(tMCA_HANDLE handle); ** Description Create a data endpoint. If the MDEP is created successfully, ** the MDEP ID is returned in *p_dep. After a data endpoint is ** created, an application can initiate a connection between this -** endpoint and an endpoint on a peer device. +** endpoint and an endpoint on a peer device. ** ** Returns MCA_SUCCESS if successful, otherwise error. ** @@ -296,7 +309,7 @@ MCA_API extern tMCA_RESULT MCA_DeleteDep(tMCA_HANDLE handle, tMCA_DEP dep); ** ** Function MCA_ConnectReq ** -** Description This function initiates an MCAP control channel connection +** Description This function initiates an MCAP control channel connection ** to the peer device. When the connection is completed, an ** MCA_CONNECT_IND_EVT is reported to the application via its ** control callback function. @@ -317,7 +330,7 @@ MCA_API extern tMCA_RESULT MCA_ConnectReq(tMCA_HANDLE handle, BD_ADDR bd_addr, ** Function MCA_DisconnectReq ** ** Description This function disconnect an MCAP control channel -** to the peer device. +** to the peer device. ** If associated data channel exists, they are disconnected. ** When the MCL is disconnected an MCA_DISCONNECT_IND_EVT is ** reported to the application via its control callback function. @@ -334,7 +347,7 @@ MCA_API extern tMCA_RESULT MCA_DisconnectReq(tMCA_CL mcl); ** Description This function sends a CREATE_MDL request to the peer device. ** When the response is received, a MCA_CREATE_CFM_EVT is reported ** with the given MDL ID. -** If the response is successful, a data channel is open +** If the response is successful, a data channel is open ** with the given p_chnl_cfg ** When the data channel is open successfully, a MCA_OPEN_CFM_EVT ** is reported. This data channel is identified as tMCA_DL. @@ -452,7 +465,7 @@ MCA_API extern tMCA_RESULT MCA_Delete(tMCA_CL mcl, UINT16 mdl_id); ** ** Function MCA_WriteReq ** -** Description Send a data packet to the peer device. +** Description Send a data packet to the peer device. ** ** The application passes the packet using the BT_HDR structure. ** The offset field must be equal to or greater than L2CAP_MIN_OFFSET. diff --git a/stack/include/mca_defs.h b/stack/include/mca_defs.h index aebf315..cca7fe0 100644 --- a/stack/include/mca_defs.h +++ b/stack/include/mca_defs.h @@ -1,15 +1,27 @@ -/***************************************************************************** -** -** Name: mca_defs.h -** -** Description: This contains constants definitions and other information -** from the MCAP specification. -** -** -** Copyright (c) 2009-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2009-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This contains constants definitions and other information from the MCAP + * specification. + * + ******************************************************************************/ #ifndef MCA_DEFS_H #define MCA_DEFS_H diff --git a/stack/include/obx_api.h b/stack/include/obx_api.h index ab6cae6..472eeb0 100644 --- a/stack/include/obx_api.h +++ b/stack/include/obx_api.h @@ -1,13 +1,20 @@ -/***************************************************************************** -** -** Name: obx_api.h -** -** File: Object Exchange Protocol Application Programming Interface -** -** Copyright (c) 2003-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2003-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef OBX_API_H #define OBX_API_H #include "bt_target.h" @@ -99,7 +106,7 @@ typedef UINT8 tOBX_SETPATH_FLAG; /* Authentication Challenge Options */ #define OBX_AO_NONE 0x00 /* If this is used in OBX_StartServer and the authenticate - * flag is TRUE, the optional Challenge Information (tag 0x01) + * flag is TRUE, the optional Challenge Information (tag 0x01) * will not be sent. */ #define OBX_AO_USR_ID 0x01 /* Set this bit to make the client respond with the user ID. */ typedef UINT8 tOBX_AUTH_OPT; @@ -243,26 +250,26 @@ enum { OBX_NULL_DISP, /* server events */ - OBX_CONNECT_REQ_DISP, - OBX_SESSION_REQ_DISP, + OBX_CONNECT_REQ_DISP, + OBX_SESSION_REQ_DISP, OBX_DISCONNECT_REQ_DISP, - OBX_PUT_REQ_DISP, + OBX_PUT_REQ_DISP, OBX_GET_REQ_DISP, - OBX_SETPATH_REQ_DISP, + OBX_SETPATH_REQ_DISP, OBX_ABORT_REQ_DISP, - OBX_ACTION_REQ_DISP, + OBX_ACTION_REQ_DISP, /* client events */ - OBX_CONNECT_RSP_DISP, - OBX_SESSION_RSP_DISP, + OBX_CONNECT_RSP_DISP, + OBX_SESSION_RSP_DISP, OBX_DISCONNECT_RSP_DISP, OBX_PUT_RSP_DISP, OBX_GET_RSP_DISP, OBX_SETPATH_RSP_DISP, OBX_ABORT_RSP_DISP, - OBX_ACTION_RSP_DISP, + OBX_ACTION_RSP_DISP, /* common events */ - OBX_CLOSE_IND_DISP, - OBX_TIMEOUT_DISP, + OBX_CLOSE_IND_DISP, + OBX_TIMEOUT_DISP, OBX_PASSWORD_DISP }; #define OBX_DISP_IS_RECV 0x80 @@ -410,8 +417,8 @@ typedef UINT8 tOBX_RSP_CODE; #define OBX_USERID_RSP_TAG 1 #define OBX_NONCE_RSP_TAG 2 -typedef struct -{ +typedef struct +{ UINT8 tag; UINT8 len; UINT8 *p_array; @@ -466,7 +473,7 @@ extern "C" ** Function OBX_Init ** ** Description This function is called to initialize the control block for this -** layer. It must be called before accessing any other of its API +** layer. It must be called before accessing any other of its API ** functions. It is typically called once during the start up of ** the stack. ** @@ -552,7 +559,7 @@ OBX_API extern tOBX_STATUS OBX_AddSuspendedSession(tOBX_HANDLE shandle, BD_ADDR ** ** Function OBX_ConnectRsp ** -** Description This function is called to send the response to a Connect +** Description This function is called to send the response to a Connect ** Request from an OBEX client. ** ** Returns OBX_SUCCESS, if successful. @@ -566,20 +573,20 @@ OBX_API extern tOBX_STATUS OBX_ConnectRsp(tOBX_HANDLE shandle, UINT8 rsp_code, B ** Function OBX_SessionRsp ** ** Description This function is called to respond to a request to create a reliable session. -** +** ** ** Returns OBX_SUCCESS, if successful. ** OBX_BAD_HANDLE, if the handle is not valid. ** *******************************************************************************/ -OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code, +OBX_API extern tOBX_STATUS OBX_SessionRsp(tOBX_HANDLE shandle, UINT8 rsp_code, UINT8 ssn, UINT32 offset, BT_HDR *p_pkt); /******************************************************************************* ** ** Function OBX_SetPathRsp ** -** Description This function is called to send the response to a Set Path +** Description This function is called to send the response to a Set Path ** Request from an OBEX client. ** ** Returns OBX_SUCCESS, if successful. @@ -685,7 +692,7 @@ OBX_API extern UINT16 OBX_GetPeerAddr(tOBX_HANDLE shandle, BD_ADDR bd_addr); ** Function OBX_GetPortHandle ** ** Description This function is called to get the RFCOMM port handle for the obex connection. -** +** ** ** Returns OBX_SUCCESS, if successful. ** OBX_NO_RESOURCES, if no existing connection. @@ -835,7 +842,7 @@ OBX_API extern tOBX_STATUS OBX_DisconnectReq(tOBX_HANDLE handle, BT_HDR *p_pkt); ** Function OBX_ActionReq ** ** Description This function sends a Action request to the connected server. -** The Name Header and DestName Header must be in p_pkt for +** The Name Header and DestName Header must be in p_pkt for ** the Copy and Move Object action. ** The Name header and Permission Header must be in p_pkt for ** the Set Object Permission action. @@ -989,7 +996,7 @@ OBX_API extern BOOLEAN OBX_AddAsciiDescrHdr(BT_HDR *p_pkt, char *p_descr); ** Function OBX_AddTargetHdr ** ** Description This function is called to add an OBEX Target header to an OBEX -** packet. This header is most commonly used in Connect packets. +** packet. This header is most commonly used in Connect packets. ** ** NOTE: The target header must be the first header in an OBEX message. ** @@ -1047,7 +1054,7 @@ OBX_API extern UINT8 *OBX_AddBodyStart(BT_HDR *p_pkt, UINT16 *p_len); ** Description This function is called to add the HI and the length of HV of an ** OBEX body header to an OBEX packet. If end is TRUE, HI is ** OBX_HI_BODY_END. If FALSE, HI is OBX_HI_BODY. It is assumed that -** the actual value of the body has been copied into the OBEX packet. +** the actual value of the body has been copied into the OBEX packet. ** ** Returns void ** @@ -1231,7 +1238,7 @@ OBX_API extern UINT8 * OBX_CheckHdr(BT_HDR *p_pkt, UINT8 id); ** ** Function OBX_ReadNumHdrs ** -** Description This function is called to check the number of headers in the +** Description This function is called to check the number of headers in the ** given OBEX packet ** ** Returns number of headers. @@ -1256,7 +1263,7 @@ OBX_API extern UINT16 OBX_ReadHdrLen(BT_HDR *p_pkt, UINT8 id); ** ** Function OBX_ReadNameHdr ** -** Description This function is called to get the Name Header in the given +** Description This function is called to get the Name Header in the given ** OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1280,7 +1287,7 @@ OBX_API extern void OBX_WcharToChar (char *a_str, UINT16* w_str, UINT16 a_size) ** ** Function OBX_ReadAsciiNameHdr ** -** Description This function is called to get the Name Header in the given +** Description This function is called to get the Name Header in the given ** OBEX packet. If Name header exists in the given OBEX packet, ** it is converted to ASCII format and copied into p_name. ** @@ -1294,7 +1301,7 @@ OBX_API extern BOOLEAN OBX_ReadAsciiNameHdr(BT_HDR *p_pkt, char *p_name, UINT16 ** ** Function OBX_ReadTypeHdr ** -** Description This function is called to get the Type Header in the given +** Description This function is called to get the Type Header in the given ** OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1307,7 +1314,7 @@ OBX_API extern BOOLEAN OBX_ReadTypeHdr(BT_HDR *p_pkt, UINT8 **p_type, UINT16 *p_ ** ** Function OBX_ReadLengthHdr ** -** Description This function is called to get the Length Header in the given +** Description This function is called to get the Length Header in the given ** OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1320,7 +1327,7 @@ OBX_API extern BOOLEAN OBX_ReadLengthHdr(BT_HDR *p_pkt, UINT32 *p_len); ** ** Function OBX_ReadTimeHdr ** -** Description This function is called to get the Time Header in the given +** Description This function is called to get the Time Header in the given ** OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1468,7 +1475,7 @@ OBX_API extern BOOLEAN OBX_ReadPermissionHdr(BT_HDR *p_pkt, UINT8 *p_user, UINT8 ** ** Function OBX_Read1ByteHdr ** -** Description This function is called to get the UINT8 HV of the given HI +** Description This function is called to get the UINT8 HV of the given HI ** in the given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1481,7 +1488,7 @@ OBX_API extern BOOLEAN OBX_Read1ByteHdr(BT_HDR *p_pkt, UINT8 id, UINT8 *p_data); ** ** Function OBX_Read4ByteHdr ** -** Description This function is called to get the UINT32 HV of the given HI +** Description This function is called to get the UINT32 HV of the given HI ** in the given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1533,7 +1540,7 @@ OBX_API extern BOOLEAN OBX_ReadTriplet(BT_HDR *p_pkt, UINT8 id, tOBX_TRIPLET *p_ ** ** Function OBX_ReadActionIdHdr ** -** Description This function is called to get the HV of the Action ID header +** Description This function is called to get the HV of the Action ID header ** in the given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1546,7 +1553,7 @@ OBX_API extern BOOLEAN OBX_ReadActionIdHdr(BT_HDR *p_pkt, UINT8 *p_data); ** ** Function OBX_ReadChallenge ** -** Description This function is called to read the Realm and options of the +** Description This function is called to read the Realm and options of the ** Authentication Challenge Header in the given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1561,7 +1568,7 @@ OBX_API extern BOOLEAN OBX_ReadChallenge(BT_HDR *p_pkt, tOBX_CHARSET *p_charset, ** ** Function OBX_ReadAuthParams ** -** Description This function is called to read the User ID of the +** Description This function is called to read the User ID of the ** Authentication Response Header in the given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. @@ -1639,7 +1646,7 @@ OBX_API extern BOOLEAN OBX_AddUtf8DestNameHdr(BT_HDR *p_pkt, UINT8 *p_dest); ** ** Function OBX_ReadUtf8NameHdr ** -** Description This function is called to get the Name Header in the given +** Description This function is called to get the Name Header in the given ** OBEX packet. If Name header exists in the given OBEX packet, ** it is converted to UTF8 format and copied into p_name. ** @@ -1669,7 +1676,7 @@ OBX_API extern BOOLEAN OBX_ReadUtf8DescrHdr(BT_HDR *p_pkt, UINT8 *p_descr, UINT1 ** Function OBX_ReadUtf8DestNameHdr ** ** Description This function is called to get the DestName Header in the -** given OBEX packet. +** given OBEX packet. ** ** Returns TRUE, if the header is in the OBEX packet. ** FALSE, otherwise. diff --git a/stack/include/pan_api.h b/stack/include/pan_api.h index 9af03de..a604463 100644 --- a/stack/include/pan_api.h +++ b/stack/include/pan_api.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: pan_api.h -** -** Description: this file contains the PAN API definitions -** -** -** Copyright (c) 2001-2004, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2001-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * this file contains the PAN API definitions + * + ******************************************************************************/ #ifndef PAN_API_H #define PAN_API_H @@ -18,7 +31,7 @@ *****************************************************************************/ /* Define the minimum offset needed in a GKI buffer for -** sending PAN packets. Note, we are currently not sending +** sending PAN packets. Note, we are currently not sending ** extension headers, but may in the future, so allow ** space for them */ @@ -81,7 +94,7 @@ typedef UINT8 tPAN_RESULT; ** to the application. The second parameter TRUE means ** to create the bridge and FALSE means to remove it. */ -typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change, +typedef void (tPAN_CONN_STATE_CB) (UINT16 handle, BD_ADDR bd_addr, tPAN_RESULT state, BOOLEAN is_role_change, UINT8 src_role, UINT8 dst_role); @@ -218,7 +231,7 @@ extern "C" ** should set the PAN role explicitly. ** ** Parameters: p_register - contains all callback function pointers -** +** ** ** Returns none ** @@ -259,7 +272,7 @@ PAN_API extern void PAN_Deregister (void); ** p_gn_name - Service name for GN role ** p_nap_name - Service name for NAP role ** Can be NULL if user wants it to be default -** +** ** Returns PAN_SUCCESS - if the role is set successfully ** PAN_FAILURE - if the role is not valid ** @@ -274,7 +287,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role, ** ** Function PAN_Connect ** -** Description This function is called by the application to initiate a +** Description This function is called by the application to initiate a ** connection to the remote device ** ** Parameters: rem_bda - BD Addr of the remote device @@ -284,7 +297,7 @@ PAN_API extern tPAN_RESULT PAN_SetRole (UINT8 role, ** PAN_ROLE_GN_SERVER is for GN role ** PAN_ROLE_NAP_SERVER is for NAP role ** *handle - Pointer for returning Handle to the connection -** +** ** Returns PAN_SUCCESS - if the connection is initiated successfully ** PAN_NO_RESOURCES - resources are not sufficent ** PAN_FAILURE - if the connection cannot be initiated @@ -299,10 +312,10 @@ PAN_API extern tPAN_RESULT PAN_Connect (BD_ADDR rem_bda, UINT8 src_role, UINT8 d ** ** Function PAN_Disconnect ** -** Description This is used to disconnect the connection +** Description This is used to disconnect the connection ** ** Parameters: handle - handle for the connection -** +** ** Returns PAN_SUCCESS - if the connection is closed successfully ** PAN_FAILURE - if the connection is not found or ** there is an error in disconnecting @@ -327,7 +340,7 @@ PAN_API extern tPAN_RESULT PAN_Disconnect (UINT16 handle); ** p_data - pointer to the data ** len - length of the data ** ext - to indicate that extension headers present -** +** ** Returns PAN_SUCCESS - if the data is sent successfully ** PAN_FAILURE - if the connection is not found or ** there is an error in sending data @@ -357,7 +370,7 @@ PAN_API extern tPAN_RESULT PAN_Write (UINT16 handle, ** protocol - protocol of the ethernet packet like IP or ARP ** p_buf - pointer to the data buffer ** ext - to indicate that extension headers present -** +** ** Returns PAN_SUCCESS - if the data is sent successfully ** PAN_FAILURE - if the connection is not found or ** there is an error in sending data @@ -380,7 +393,7 @@ PAN_API extern tPAN_RESULT PAN_WriteBuf (UINT16 handle, ** num_filters - number of protocol filter ranges ** start - array of starting protocol numbers ** end - array of ending protocol numbers -** +** ** ** Returns PAN_SUCCESS if protocol filters are set successfully ** PAN_FAILURE if connection not found or error in setting @@ -403,7 +416,7 @@ PAN_API extern tPAN_RESULT PAN_SetProtocolFilters (UINT16 handle, ** multicast address ranges ** p_end_array - Pointer to sequence of ends of all ** multicast address ranges -** +** ** ** Returns PAN_SUCCESS if multicast filters are set successfully ** PAN_FAILURE if connection not found or error in setting diff --git a/stack/include/port_api.h b/stack/include/port_api.h index b7a7417..2f64932 100644 --- a/stack/include/port_api.h +++ b/stack/include/port_api.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: port_api.h -** -** Description: this file contains the PORT API definitions -** -** -** Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * this file contains the PORT API definitions + * + ******************************************************************************/ #ifndef PORT_API_H #define PORT_API_H diff --git a/stack/include/port_ext.h b/stack/include/port_ext.h index 37497d8..e25b6d9 100644 --- a/stack/include/port_ext.h +++ b/stack/include/port_ext.h @@ -1,14 +1,27 @@ -/*****************************************************************************/ -/* */ -/* Name: port_ext.h */ -/* */ -/* Description: This file contains external definitions of Port Emulation */ -/* entity unit */ -/* */ -/* */ -/* Copyright (c) 1999-2004, WIDCOMM Inc., All Rights Reserved. */ -/* WIDCOMM Bluetooth Core. Proprietary and confidential. */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains external definitions of Port Emulation entity unit + * + ******************************************************************************/ + #ifndef PORTEXT_H #define PORTEXT_H diff --git a/stack/include/rfcdefs.h b/stack/include/rfcdefs.h index 4dacda1..dcc37bc 100644 --- a/stack/include/rfcdefs.h +++ b/stack/include/rfcdefs.h @@ -1,14 +1,26 @@ -/****************************************************************************/ -/* */ -/* Name rfcdefs.h */ -/* */ -/* Function this file contains definitions for the RFCOMM protocol */ -/* */ -/* */ -/* Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved. */ -/* Broadcom Bluetooth Core. Proprietary and confidential. */ -/* */ -/****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/**************************************************************************** + * + * This file contains definitions for the RFCOMM protocol + * + ****************************************************************************/ #ifndef RFCDEFS_H #define RFCDEFS_H @@ -16,7 +28,7 @@ #define PORT_MAX_RFC_PORTS 31 /* -** If nothing is negotiated MTU should be 127 +** If nothing is negotiated MTU should be 127 */ #define RFCOMM_DEFAULT_MTU 127 @@ -86,10 +98,10 @@ } #define RFCOMM_FRAME_IS_CMD(initiator, cr) \ - (( (initiator) && !(cr)) || (!(initiator) && (cr))) + (( (initiator) && !(cr)) || (!(initiator) && (cr))) #define RFCOMM_FRAME_IS_RSP(initiator, cr) \ - (( (initiator) && (cr)) || (!(initiator) && !(cr))) + (( (initiator) && (cr)) || (!(initiator) && !(cr))) #define RFCOMM_CR(initiator, is_command) \ (( ( (initiator) && (is_command)) \ @@ -129,9 +141,9 @@ #define RFCOMM_MSC_RTR 0x08 /* Ready to receive*/ #define RFCOMM_MSC_IC 0x40 /* Incomming call indicator*/ #define RFCOMM_MSC_DV 0x80 /* Data Valid*/ - -#define RFCOMM_MSC_SHIFT_BREAK 4 -#define RFCOMM_MSC_BREAK_MASK 0xF0 + +#define RFCOMM_MSC_SHIFT_BREAK 4 +#define RFCOMM_MSC_BREAK_MASK 0xF0 #define RFCOMM_MSC_BREAK_PRESENT_MASK 0x02 #define RFCOMM_BAUD_RATE_2400 0x00 @@ -143,26 +155,26 @@ #define RFCOMM_BAUD_RATE_57600 0x06 #define RFCOMM_BAUD_RATE_115200 0x07 #define RFCOMM_BAUD_RATE_230400 0x08 - + #define RFCOMM_5_BITS 0x00 #define RFCOMM_6_BITS 0x01 #define RFCOMM_7_BITS 0x02 #define RFCOMM_8_BITS 0x03 - + #define RFCOMM_RPN_BITS_MASK 0x03 #define RFCOMM_RPN_BITS_SHIFT 0 - + #define RFCOMM_ONESTOPBIT 0x00 #define RFCOMM_ONE5STOPBITS 0x01 - + #define RFCOMM_RPN_STOP_BITS_MASK 0x01 #define RFCOMM_RPN_STOP_BITS_SHIFT 2 - + #define RFCOMM_PARITY_NO 0x00 #define RFCOMM_PARITY_YES 0x01 #define RFCOMM_RPN_PARITY_MASK 0x01 #define RFCOMM_RPN_PARITY_SHIFT 3 - + #define RFCOMM_ODD_PARITY 0x00 #define RFCOMM_EVEN_PARITY 0x01 #define RFCOMM_MARK_PARITY 0x02 diff --git a/stack/include/sdp_api.h b/stack/include/sdp_api.h index 121afd4..dcc813e 100644 --- a/stack/include/sdp_api.h +++ b/stack/include/sdp_api.h @@ -1,13 +1,20 @@ -/**************************************************************************** -** -** Name: sdp_api.h -** Function this file contains the definitions for the SDP API -** -** -** Copyright (c) 1999-2009, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef SDP_API_H #define SDP_API_H diff --git a/stack/include/sdpdefs.h b/stack/include/sdpdefs.h index 6ef2972..c290e03 100644 --- a/stack/include/sdpdefs.h +++ b/stack/include/sdpdefs.h @@ -1,13 +1,27 @@ -/****************************************************************************/ -/* */ -/* Name: sdp_defs.h */ -/* */ -/* Function this file contains the definitions for the SDP API */ -/* */ -/* Copyright (c) 1999-2009, Broadcom Corp, All Rights Reserved. */ -/* Broadcom Bluetooth Core. Proprietary and confidential. */ -/* */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains the definitions for the SDP API + * + ******************************************************************************/ + #ifndef SDP_DEFS_H #define SDP_DEFS_H @@ -164,7 +178,7 @@ #define UUID_PROTOCOL_MCAP_CTRL 0x001E #define UUID_PROTOCOL_MCAP_DATA 0x001F #define UUID_PROTOCOL_L2CAP 0x0100 -#define UUID_PROTOCOL_ATT 0x0007 +#define UUID_PROTOCOL_ATT 0x0007 /* Define common 16-bit service class UUIDs */ @@ -240,8 +254,8 @@ #define UUID_SERVCLASS_MESSAGE_ACCESS 0X1132 /* Message Access Service UUID */ #define UUID_SERVCLASS_MESSAGE_NOTIFICATION 0X1133 /* Message Notification Service UUID */ -#define UUID_SERVCLASS_GAP_SERVER 0x1800 -#define UUID_SERVCLASS_GATT_SERVER 0x1801 +#define UUID_SERVCLASS_GAP_SERVER 0x1800 +#define UUID_SERVCLASS_GATT_SERVER 0x1801 #define UUID_SERVCLASS_IMMEDIATE_ALERT 0x1802 /* immediate alert */ #define UUID_SERVCLASS_LINKLOSS 0x1803 /* Link Loss Alert */ #define UUID_SERVCLASS_TX_POWER 0x1804 /* TX power */ diff --git a/stack/include/smp_api.h b/stack/include/smp_api.h index f04ff92..bd7b131 100644 --- a/stack/include/smp_api.h +++ b/stack/include/smp_api.h @@ -1,18 +1,26 @@ -/***************************************************************************** -** -** Name: smp_api.h -** -** Description: This file contains the SMP API function -** external definitions. -** -** The SMP consists of several management entities: -** 1. Address & Identity Privacy -** 2. Authentication -** 3. Encryption -** -** Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved. -** Broadcom Bluetooth Core. Proprietary and confidential. -******************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains the SMP API function external definitions. + * + ******************************************************************************/ #ifndef SMP_API_H #define SMP_API_H @@ -81,25 +89,25 @@ enum typedef UINT8 tSMP_OOB_FLAG; #define SMP_AUTH_NO_BOND 0x00 -#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND +#define SMP_AUTH_GEN_BOND 0x01 //todo sdh change GEN_BOND to BOND /* SMP Authentication requirement */ #define SMP_AUTH_YN_BIT (1 << 2) #define SMP_AUTH_MASK (SMP_AUTH_GEN_BOND|SMP_AUTH_YN_BIT) -#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND +#define SMP_AUTH_BOND SMP_AUTH_GEN_BOND #define SMP_AUTH_NB_ENC_ONLY 0x00 //(SMP_AUTH_MASK | BTM_AUTH_SP_NO) /* no MITM, No Bonding, Encryptino only */ -#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability - to detrermine authenticaion procedure */ +#define SMP_AUTH_NB_IOCAP (SMP_AUTH_NO_BOND | SMP_AUTH_YN_BIT) /* MITM, No Bonding, Use IO Capability + to detrermine authenticaion procedure */ #define SMP_AUTH_GB_ENC_ONLY (SMP_AUTH_GEN_BOND ) /* no MITM, General Bonding, Encryptino only */ -#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability +#define SMP_AUTH_GB_IOCAP (SMP_AUTH_GEN_BOND | SMP_AUTH_YN_BIT) /* MITM, General Bonding, Use IO Capability to detrermine authenticaion procedure */ typedef UINT8 tSMP_AUTH_REQ; #define SMP_SEC_NONE 0 -#define SMP_SEC_UNAUTHENTICATE (1 << 0) +#define SMP_SEC_UNAUTHENTICATE (1 << 0) #define SMP_SEC_AUTHENTICATED (1 << 2) typedef UINT8 tSMP_SEC_LEVEL; @@ -120,7 +128,7 @@ typedef struct tSMP_AUTH_REQ auth_req; /* Authentication required (for local device) */ UINT8 max_key_size; /* max encryption key size */ tSMP_KEYS init_keys; /* initiator keys to be distributed */ - tSMP_KEYS resp_keys; /* responder keys */ + tSMP_KEYS resp_keys; /* responder keys */ } tSMP_IO_REQ; typedef struct @@ -228,8 +236,8 @@ extern "C" ** Description This function is called to grant security process. ** ** Parameters bd_addr - peer device bd address. -** res - result of the operation SMP_SUCCESS if success. -** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts. +** res - result of the operation SMP_SUCCESS if success. +** Otherwise, SMP_REPEATED_ATTEMPTS is too many attempts. ** ** Returns None ** @@ -244,7 +252,7 @@ extern "C" ** Passkey request to the application. ** ** Parameters: bd_addr - Address of the device for which PIN was requested -** res - result of the operation BTM_SUCCESS if success +** res - result of the operation BTM_SUCCESS if success ** passkey - numeric value in the range of ** BTM_MIN_PASSKEY_VAL(0) - BTM_MAX_PASSKEY_VAL(999999(0xF423F)). ** @@ -259,11 +267,11 @@ extern "C" ** Simple Pairing in response to BTM_SP_RMT_OOB_EVT ** ** Parameters: bd_addr - Address of the peer device -** res - result of the operation SMP_SUCCESS if success +** res - result of the operation SMP_SUCCESS if success ** p_data - simple pairing Randomizer C. ** *******************************************************************************/ - SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len, + SMP_API extern void SMP_OobDataReply(BD_ADDR bd_addr, tSMP_STATUS res, UINT8 len, UINT8 *p_data); /******************************************************************************* @@ -272,18 +280,18 @@ extern "C" ** ** Description This function is called to encrypt the data with the specified ** key -** +** ** Parameters: key - Pointer to key key[0] conatins the MSB ** key_len - key length ** plain_text - Pointer to data to be encrypted ** plain_text[0] conatins the MSB ** pt_len - plain text length ** p_out - pointer to the encrypted outputs -** -** Returns Boolean - TRUE: encryption is successful +** +** Returns Boolean - TRUE: encryption is successful *******************************************************************************/ - SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len, - UINT8 *plain_text, UINT8 pt_len, + SMP_API extern BOOLEAN SMP_Encrypt (UINT8 *key, UINT8 key_len, + UINT8 *plain_text, UINT8 pt_len, tSMP_ENC *p_out); #ifdef __cplusplus diff --git a/stack/include/uipc_msg.h b/stack/include/uipc_msg.h index 0091687..6a9a4ae 100644 --- a/stack/include/uipc_msg.h +++ b/stack/include/uipc_msg.h @@ -1,12 +1,27 @@ -/*****************************************************************************/ -/* */ -/* Name: uipc_sync.h */ -/* */ -/* Description: this file contains sync message over UIPC */ -/* */ -/* Copyright (c) 1999-2007, Broadcom Corp., All Rights Reserved. */ -/* WIDCOMM Bluetooth Core. Proprietary and confidential. */ -/*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains sync message over UIPC + * + ******************************************************************************/ + #ifndef UIPC_MSG_H #define UIPC_MSG_H @@ -26,7 +41,7 @@ ********************************/ /* tUIPC_STATUS codes*/ -enum +enum { UIPC_STATUS_SUCCESS, UIPC_STATUS_FAIL @@ -107,7 +122,7 @@ typedef struct t_uipc_log_msg #define SLIP_SYNC_SUCCESS 0 #define SLIP_SYNC_FAILURE 1 -typedef struct +typedef struct { UINT8 op_code; UINT8 status; @@ -152,7 +167,7 @@ typedef struct t_l2c_stream_info typedef struct t_l2c_sync_to_lite_req { - UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */ + UINT8 op_code; /* L2C_SYNC_TO_LITE_REQ */ UINT16 light_xmit_quota; /* Total quota for light stack */ UINT16 acl_data_size; /* Max ACL data size across HCI transport */ UINT16 non_flushable_pbf; /* L2CAP_PKT_START_NON_FLUSHABLE if controller supports */ @@ -387,8 +402,8 @@ typedef UINT16 tAUDIO_CODEC_TYPE; #define CODEC_INFO_SBC_SUBBAND_8 0x01 /* MPEG audio version ID */ -#define CODEC_INFO_MP25_ID 0x00 -#define CODEC_INFO_RESERVE 0x01 +#define CODEC_INFO_MP25_ID 0x00 +#define CODEC_INFO_RESERVE 0x01 #define CODEC_INFO_MP2_ID 0x02 #define CODEC_INFO_MP3_ID 0x03 @@ -564,10 +579,10 @@ typedef struct typedef struct { - UINT16 sampling_freq; + UINT16 sampling_freq; UINT8 channel_mode; /* 0x02:mono, 0x01:dual */ UINT32 bitrate; /* 0 - 320K */ - UINT32 sbr_profile; /* 1: ON, 0: OFF */ + UINT32 sbr_profile; /* 1: ON, 0: OFF */ } tCODEC_INFO_AAC; typedef union @@ -686,7 +701,7 @@ typedef struct tAUDIO_ROUTE_SF src_sf; tAUDIO_ROUTE_OUT out; tAUDIO_ROUTE_SF out_codec_sf; - tAUDIO_ROUTE_SF out_i2s_sf; + tAUDIO_ROUTE_SF out_i2s_sf; tAUDIO_ROUTE_EQ eq_mode; } tAUDIO_ROUTE_CONFIG_REQ; @@ -720,13 +735,13 @@ typedef struct UINT32 audio_l_g2; /* IIR biquad filter left ch gain 2 */ UINT32 audio_l_g3; /* IIR biquad filter left ch gain 3 */ UINT32 audio_l_g4; /* IIR biquad filter left ch gain 4 */ - UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */ + UINT32 audio_l_gl; /* IIR biquad filter left ch global gain */ UINT32 audio_r_g0; /* IIR biquad filter left ch gain 0 */ UINT32 audio_r_g1; /* IIR biquad filter left ch gain 1 */ UINT32 audio_r_g2; /* IIR biquad filter left ch gain 2 */ UINT32 audio_r_g3; /* IIR biquad filter left ch gain 3 */ UINT32 audio_r_g4; /* IIR biquad filter left ch gain 4 */ - UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */ + UINT32 audio_r_gl; /* IIR biquad filter left ch global gain */ } tEQ_GAIN_CONFIG; typedef struct @@ -734,7 +749,7 @@ typedef struct UINT8 opcode; /* AUDIO_MIX_CONFIG_REQ */ tAUDIO_ROUTE_MIX mix_src; tAUDIO_ROUTE_SF mix_src_sf; - tMIX_SCALE_CONFIG mix_scale; + tMIX_SCALE_CONFIG mix_scale; tCHIRP_CONFIG chirp_config; } tAUDIO_MIX_CONFIG_REQ; @@ -771,7 +786,7 @@ typedef struct typedef struct { UINT8 opcode; /* AUDIO_SCALE_CONFIG_REQ */ - tMIX_SCALE_CONFIG mix_scale; + tMIX_SCALE_CONFIG mix_scale; } tAUDIO_SCALE_CONFIG_REQ; typedef UINT8 tBTA_AV_DUAL_STACK_EVT; diff --git a/stack/include/utfc.h b/stack/include/utfc.h index 4460b8f..787efe8 100644 --- a/stack/include/utfc.h +++ b/stack/include/utfc.h @@ -1,13 +1,26 @@ -/***************************************************************************** -** -** Name: utfc.h -** -** Description: UTF conversion utilities. -** -** Copyright (c) 2003-2004, WIDCOMM Inc., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2003-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * UTF conversion utilities. + * + ******************************************************************************/ #ifndef UTFC_H #define UTFC_H diff --git a/stack/include/wbt_api.h b/stack/include/wbt_api.h index be94e56..8bfb772 100644 --- a/stack/include/wbt_api.h +++ b/stack/include/wbt_api.h @@ -1,14 +1,27 @@ -/***************************************************************************** -** -** Name: wbt_api.h -** -** Description: This file contains definitions and constants used by the -** Broadcom Bluetooth Extensions API software. -** -** Copyright (c) 2003-2005, Broadcom Corp., All Rights Reserved. -** WIDCOMM Bluetooth Core. Proprietary and confidential. -** -*****************************************************************************/ +/****************************************************************************** + * + * Copyright (C) 2003-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ + +/****************************************************************************** + * + * This file contains definitions and constants used by the Broadcom + * Bluetooth Extensions API software. + * + ******************************************************************************/ #ifndef WBT_API_H #define WBT_API_H diff --git a/stack/include/wcassert.h b/stack/include/wcassert.h index 459081f..a1d7b47 100644 --- a/stack/include/wcassert.h +++ b/stack/include/wcassert.h @@ -1,24 +1,23 @@ +/****************************************************************************** + * + * Copyright (C) 1999-2012 Broadcom Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ #ifndef WC_ASSERT_H #define WC_ASSERT_H -/******************************************************************************* -** -** File Name: wcassert.h -** -** Purpose: Defines the macro WC_ASSERT(), which is used during -** development / debugging to do precondition and postcondition -** checks for routines. -** -** The macros are enabled when _DEBUG is defined. -** Note: -** None. -** -** Revision History: -** 10/23/99 Stephen Lee Create -** -** Copyright (c) 1999-2004 WIDCOMM Inc., All Rights Reserved. -** -*******************************************************************************/ - + #ifdef _DEBUG |