| STM32L - BlueNRG-1 BLE stack APIs, Events and Constants

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_gap.h
Go to the documentation of this file.
1
21 #ifndef __GAP_H__
22 #define __GAP_H__
23
24 #include <link_layer.h>
25
36 #define GAP_SERVICE_UUID (0x1800)
37 #define DEVICE_NAME_UUID (0x2A00)
38 #define APPEARANCE_UUID (0x2A01)
39 #define PERIPHERAL_PRIVACY_FLAG_UUID (0x2A02)
40 #define RECONNECTION_ADDR_UUID (0x2A03)
41 #define PERIPHERAL_PREFERRED_CONN_PARAMS_UUID (0x2A04)
42
50 #define DEVICE_NAME_CHARACTERISTIC_LEN (8)
51 #define APPEARANCE_CHARACTERISTIC_LEN (2)
52 #define PERIPHERAL_PRIVACY_CHARACTERISTIC_LEN (1)
53 #define RECONNECTION_ADDR_CHARACTERISTIC_LEN (6)
54 #define PERIPHERAL_PREF_CONN_PARAMS_CHARACTERISTIC_LEN (8)
55
59 /*------------- AD types for adv data and scan response data ----------------*/
60
67 /* FLAGS AD type */
68 #define AD_TYPE_FLAGS (0x01)
69 /* flag bits */
76 #define FLAG_BIT_LE_LIMITED_DISCOVERABLE_MODE (0x01)
77 #define FLAG_BIT_LE_GENERAL_DISCOVERABLE_MODE (0x02)
78 #define FLAG_BIT_BR_EDR_NOT_SUPPORTED (0x04)
79 #define FLAG_BIT_LE_BR_EDR_CONTROLLER (0x08)
80 #define FLAG_BIT_LE_BR_EDR_HOST (0x10)
81
89 #define AD_TYPE_16_BIT_SERV_UUID (0x02)
90 #define AD_TYPE_16_BIT_SERV_UUID_CMPLT_LIST (0x03)
91 #define AD_TYPE_32_BIT_SERV_UUID (0x04)
92 #define AD_TYPE_32_BIT_SERV_UUID_CMPLT_LIST (0x05)
93 #define AD_TYPE_128_BIT_SERV_UUID (0x06)
94 #define AD_TYPE_128_BIT_SERV_UUID_CMPLT_LIST (0x07)
95
99 /* LOCAL NAME AD types */
104 #define AD_TYPE_SHORTENED_LOCAL_NAME (0x08)
105 #define AD_TYPE_COMPLETE_LOCAL_NAME (0x09)
106
110 /* TX power level AD type*/
111 #define AD_TYPE_TX_POWER_LEVEL (0x0A)
112
113 /* Class of device */
114 #define AD_TYPE_CLASS_OF_DEVICE (0x0D)
115
116 /* security manager TK value AD type */
117 #define AD_TYPE_SEC_MGR_TK_VALUE (0x10)
118
119 /* security manager OOB flags */
120 #define AD_TYPE_SEC_MGR_OOB_FLAGS (0x11)
121
122 /* slave connection interval AD type */
123 #define AD_TYPE_SLAVE_CONN_INTERVAL (0x12)
124
125 /* service solicitation UUID list Ad types*/
130 #define AD_TYPE_SERV_SOLICIT_16_BIT_UUID_LIST (0x14)
131 #define AD_TYPE_SERV_SOLICIT_32_BIT_UUID_LIST (0x1F)
132 #define AD_TYPE_SERV_SOLICIT_128_BIT_UUID_LIST (0x15)
133
137 /* service data AD type */
138 #define AD_TYPE_SERVICE_DATA (0x16)
139
140 /* manufaturer specific data AD type */
141 #define AD_TYPE_MANUFACTURER_SPECIFIC_DATA (0xFF)
142
147 #define MAX_ADV_DATA_LEN (31)
148
149 #define DEVICE_NAME_LEN (7)
150 #define BD_ADDR_SIZE (6)
151
156 #define PRIVACY_ENABLED (0x01)
157 #define PRIVACY_DISABLED (0x00)
158
167 #define DIR_CONN_ADV_INT_MIN (0x190)/*250ms*/
168 #define DIR_CONN_ADV_INT_MAX (0x320)/*500ms*/
169 #define UNDIR_CONN_ADV_INT_MIN (0x800)/*1.28s*/
170 #define UNDIR_CONN_ADV_INT_MAX (0x1000)/*2.56s*/
171 #define LIM_DISC_ADV_INT_MIN (0x190)/*250ms*/
172 #define LIM_DISC_ADV_INT_MAX (0x320)/*500ms*/
173 #define GEN_DISC_ADV_INT_MIN (0x800)/*1.28s*/
174 #define GEN_DISC_ADV_INT_MAX (0x1000)/*2.56s*/
175
183 #define LIM_DISC_MODE_TIMEOUT (180000)/* 180 seconds. according to the errata published */
184 #define PRIVATE_ADDR_INT_TIMEOUT (900000)/* 15 minutes */
185
194 #define GAP_PERIPHERAL_ROLE (0x01)
195 #define GAP_BROADCASTER_ROLE (0x02)
196 #define GAP_CENTRAL_ROLE (0x04)
197 #define GAP_OBSERVER_ROLE (0x08)
198
210 #define GAP_LIMITED_DISCOVERY_PROC (0x01)
211 #define GAP_GENERAL_DISCOVERY_PROC (0x02)
212 #define GAP_NAME_DISCOVERY_PROC (0x04)
213 #define GAP_AUTO_CONNECTION_ESTABLISHMENT_PROC (0x08)
214 #define GAP_GENERAL_CONNECTION_ESTABLISHMENT_PROC (0x10)
215 #define GAP_SELECTIVE_CONNECTION_ESTABLISHMENT_PROC (0x20)
216 #define GAP_DIRECT_CONNECTION_ESTABLISHMENT_PROC (0x40)
217 #define GAP_OBSERVATION_PROC (0x80)
218
227 #endif /* __GAP_H__ */
link_layer.h
Header file for BlueNRG-1's link layer constants.