/****************************************************************************** * * Copyright (C) 2009-2013 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. * ******************************************************************************//* ... */#ifndefGAP_INT_H#defineGAP_INT_H#include"common/bt_target.h"#include"osi/fixed_queue.h"#include"stack/gap_api.h"#include"stack/gatt_api.h"#defineGAP_MAX_BLOCKS2/* Concurrent GAP commands pending at a time*//* Define the Generic Access Profile control structure */typedefstruct{void*p_data;/* Pointer to any data returned in callback */tGAP_CALLBACK*gap_cback;/* Pointer to users callback function */tGAP_CALLBACK*gap_inq_rslt_cback;/* Used for inquiry results */UINT16event;/* Passed back in the callback */UINT8index;/* Index of this control block and callback */BOOLEANin_use;/* True when structure is allocated */}{ ... }tGAP_INFO;/* Define the control block for the FindAddrByName operation (Only 1 active at a time) */typedefstruct{tGAP_CALLBACK*p_cback;tBTM_INQ_INFO*p_cur_inq;/* Pointer to the current inquiry database entry */tGAP_FINDADDR_RESULTSresults;BOOLEANin_use;}{ ... }tGAP_FINDADDR_CB;/* Define the GAP Connection Control Block.*//* ... */typedefstruct{#defineGAP_CCB_STATE_IDLE0#defineGAP_CCB_STATE_LISTENING1#defineGAP_CCB_STATE_CONN_SETUP2#defineGAP_CCB_STATE_CFG_SETUP3#defineGAP_CCB_STATE_WAIT_SEC4#defineGAP_CCB_STATE_CONNECTED56 definesUINT8con_state;#defineGAP_CCB_FLAGS_IS_ORIG0x01#defineGAP_CCB_FLAGS_HIS_CFG_DONE0x02#defineGAP_CCB_FLAGS_MY_CFG_DONE0x04#defineGAP_CCB_FLAGS_SEC_DONE0x08#defineGAP_CCB_FLAGS_CONN_DONE0x0E5 definesUINT8con_flags;UINT8service_id;/* Used by BTM */UINT16gap_handle;/* GAP handle */UINT16connection_id;/* L2CAP CID */BOOLEANrem_addr_specified;UINT8chan_mode_mask;/* Supported channel modes (FCR) */BD_ADDRrem_dev_address;UINT16psm;UINT16rem_mtu_size;BOOLEANis_congested;fixed_queue_t*tx_queue;/* Queue of buffers waiting to be sent */fixed_queue_t*rx_queue;/* Queue of buffers waiting to be read */UINT32rx_queue_size;/* Total data count in rx_queue */tGAP_CONN_CALLBACK*p_callback;/* Users callback function */tL2CAP_CFG_INFOcfg;/* Configuration */tL2CAP_ERTM_INFOertm_info;/* Pools and modes for ertm */}{ ... }tGAP_CCB;typedefstruct{#if((definedAMP_INCLUDED)&&(AMP_INCLUDED==TRUE))tAMP_APPL_INFOreg_info;#elsetL2CAP_APPL_INFOreg_info;/* L2CAP Registration info */#endiftGAP_CCBccb_pool[GAP_MAX_CONNECTIONS];}{ ... }tGAP_CONN;#ifBLE_INCLUDED==TRUE#defineGAP_MAX_CHAR_NUM4typedefstruct{UINT16handle;UINT16uuid;tGAP_BLE_ATTR_VALUEattr_value;}{ ... }tGAP_ATTR;/* ... */#endif/************************************************************************ M A I N C O N T R O L B L O C K***********************************************************************//* ... */#defineGAP_MAX_CLGATT_CL_MAX_LCBtypedefstruct{UINT16uuid;tGAP_BLE_CMPL_CBACK*p_cback;}{ ... }tGAP_BLE_REQ;typedefstruct{BD_ADDRbda;tGAP_BLE_CMPL_CBACK*p_cback;UINT16conn_id;UINT16cl_op_uuid;BOOLEANin_use;BOOLEANconnected;fixed_queue_t*pending_req_q;}{ ... }tGAP_CLCB;typedefstruct{tGAP_INFOblk[GAP_MAX_BLOCKS];tBTM_CMPL_CB*btm_cback[GAP_MAX_BLOCKS];UINT8trace_level;//tGAP_FINDADDR_CB findaddr_cb; /* Contains the control block for finding a device addr *///tBTM_INQ_INFO *cur_inqptr;#ifGAP_CONN_INCLUDED==TRUEtGAP_CONNconn;#endif/* LE GAP attribute database */#ifBLE_INCLUDED==TRUE&&GATTS_INCLUDED==TRUEtGAP_ATTRgap_attr[GAP_MAX_CHAR_NUM];tGAP_CLCBclcb[GAP_MAX_CL];/* connection link*/tGATT_IFgatt_if;/* ... */#endif}{ ... }tGAP_CB;#ifGAP_DYNAMIC_MEMORY==FALSEexterntGAP_CBgap_cb;#elseexterntGAP_CB*gap_cb_ptr;#definegap_cb(*gap_cb_ptr)/* ... */#endif#if(GAP_CONN_INCLUDED==TRUE)externvoidgap_conn_init(void);#endif#if(BLE_INCLUDED==TRUE&&GATTS_INCLUDED==TRUE)externvoidgap_attr_db_init(void);#endif/* ... */#endif
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.