TI BLE5-Stack API Documentation  1.01.12.00
linkdb.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  Group: WCS, BTS
4  $Target Device: DEVICES $
5 
6  ******************************************************************************
7  $License: TISD 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  * MACROS
31  */
32 
41 #define linkDB_Up( connectionHandle ) linkDB_State( (connectionHandle), LINK_CONNECTED )
42 
51 #define linkDB_Encrypted( connectionHandle ) linkDB_State( (connectionHandle), LINK_ENCRYPTED )
52 
61 #define linkDB_Authenticated( connectionHandle ) linkDB_State( (connectionHandle), LINK_AUTHENTICATED )
62 
71 #define linkDB_Bonded( connectionHandle ) linkDB_State( (connectionHandle), LINK_BOUND )
72 
73 /*********************************************************************
74  * CONSTANTS
75  */
76 
88 // Special case connection handles
89 #define CONNHANDLE_ALL 0xFFFD
90 #define CONNHANDLE_LOOPBACK 0xFFFE
91 #define CONNHANDLE_INVALID 0xFFFF
92 
98 #define LINK_NOT_CONNECTED 0x00
99 #define LINK_CONNECTED 0x01
100 #define LINK_AUTHENTICATED 0x02
101 #define LINK_BOUND 0x04
102 #define LINK_ENCRYPTED 0x10
103 #define LINK_SECURE_CONNECTIONS 0x20
104 #define LINK_IN_UPDATE 0x40
105 #define LINK_PAIR_TIMEOUT 0x80
106 
112 #define LINKDB_ERR_INSUFFICIENT_AUTHEN 0x05
113 #define LINBDB_ERR_INSUFFICIENT_KEYSIZE 0x0c
114 #define LINKDB_ERR_INSUFFICIENT_ENCRYPTION 0x0f
115 
120 /*********************************************************************
121  * STRUCTURES
122  */
123 
131 typedef struct
133 {
134  uint8 stateFlags;
135  uint8 addrType;
136  uint8 addr[B_ADDR_LEN];
137  uint8 addrPriv[B_ADDR_LEN];
138  uint8 connRole;
139  uint16 connInterval;
140  uint16 MTU;
141  uint16 connTimeout;
142  uint16 connLatency;
143 } linkDBInfo_t;
144 
147 /*********************************************************************
148  * PUBLIC FUNCTIONS
149  */
150 
156 extern uint8 linkDB_NumActive( void );
157 
163 extern uint8 linkDB_NumConns( void );
164 
177  extern uint8 linkDB_GetInfo( uint16 connectionHandle, linkDBInfo_t *pInfo );
178 
188  extern uint8 linkDB_State( uint16 connectionHandle, uint8 state );
189 
190 /*********************************************************************
191 *********************************************************************/
192 
193 #ifdef __cplusplus
194 }
195 #endif
196 
197 #endif /* LINKDB_H */
198 
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:115
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale