TI BLE5-Stack API Documentation  3.03.01.00
linkdb.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  Group: WCS, BTS
4  $Target Device: DEVICES $
5 
6  ******************************************************************************
7  $License: TI_TEXT 2009 $
8  ******************************************************************************
9  $Release Name: PACKAGE NAME $
10  $Release Date: PACKAGE RELEASE DATE $
11  *****************************************************************************/
12 
21 #ifndef LINKDB_H
22 #define LINKDB_H
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
29 /*********************************************************************
30  * INCLUDES
31  */
32 
33 #include "ll_common.h"
34 #include "hci.h"
35 
36 /*********************************************************************
37  * MACROS
38  */
39 
48 #define linkDB_Up( connectionHandle ) linkDB_State( (connectionHandle), LINK_CONNECTED )
49 
58 #define linkDB_Encrypted( connectionHandle ) linkDB_State( (connectionHandle), LINK_ENCRYPTED )
59 
68 #define linkDB_Authenticated( connectionHandle ) linkDB_State( (connectionHandle), LINK_AUTHENTICATED )
69 
78 #define linkDB_Bonded( connectionHandle ) linkDB_State( (connectionHandle), LINK_BOUND )
79 
80 /*********************************************************************
81  * CONSTANTS
82  */
83 
95 #define LINKDB_CONNHANDLE_ALL LL_CONNHANDLE_ALL
97 #define LINKDB_CONNHANDLE_LOOPBACK LL_CONNHANDLE_LOOPBACK
99 #define LINKDB_CONNHANDLE_INVALID LL_CONNHANDLE_INVALID
101 
107 #define LINK_NOT_CONNECTED 0x00
108 #define LINK_CONNECTED 0x01
109 #define LINK_AUTHENTICATED 0x02
110 #define LINK_BOUND 0x04
111 #define LINK_ENCRYPTED 0x10
112 #define LINK_SECURE_CONNECTIONS 0x20
113 #define LINK_IN_UPDATE 0x40
114 #define LINK_PAIR_TIMEOUT 0x80
115 
121 #define LINKDB_ERR_INSUFFICIENT_AUTHEN 0x05
122 #define LINBDB_ERR_INSUFFICIENT_KEYSIZE 0x0c
123 #define LINKDB_ERR_INSUFFICIENT_ENCRYPTION 0x0f
124 
129 /*********************************************************************
130  * STRUCTURES
131  */
132 
140 typedef struct
142 {
143  uint8 stateFlags;
144  uint8 addrType;
145  uint8 addr[B_ADDR_LEN];
146  uint8 addrPriv[B_ADDR_LEN];
147  uint8 connRole;
148  uint16 connInterval;
149  uint16 MTU;
150  uint16 connTimeout;
151  uint16 connLatency;
152 } linkDBInfo_t;
153 
156 /*********************************************************************
157  * PUBLIC FUNCTIONS
158  */
159 
165 extern uint8 linkDB_NumActive( void );
166 
172 extern uint8 linkDB_NumConns( void );
173 
186  extern uint8 linkDB_GetInfo( uint16 connectionHandle, linkDBInfo_t *pInfo );
187 
197  extern uint8 linkDB_State( uint16 connectionHandle, uint8 state );
198 
207  extern uint8 linkDB_GetActiveConnInfo( uint8 connectionHandle, hciActiveConnInfo_t *activeConnInfo );
208 
209 /*********************************************************************
210 *********************************************************************/
211 
212 #ifdef __cplusplus
213 }
214 #endif
215 
216 #endif /* LINKDB_H */
217 
HCI layer interface.
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:102
© Copyright 1995-2024, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale