TI BLE5-Stack API Documentation  1.01.02.00
gapgattserver.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file gapgattserver.h
4 
5  @brief This file contains GAP GATT attribute definitions and prototypes
6  prototypes.
7 
8  Group: WCS, BTS
9  $Target Device: DEVICES $
10 
11  ******************************************************************************
12  $License: BSD3 2009 $
13  ******************************************************************************
14  $Release Name: PACKAGE NAME $
15  $Release Date: PACKAGE RELEASE DATE $
16  *****************************************************************************/
17 
27 #ifndef GAPGATTSERVER_H
28 #define GAPGATTSERVER_H
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35 /*********************************************************************
36  * CONSTANTS
37  */
38 
40 #define GAP_DEVICE_NAME_LEN 21
41 
43 #define GAP_PRIVACY_DISABLED 0x00
44 #define GAP_PRIVACY_ENABLED 0x01
46 
48 #define GAP_RPA_ONLY_MODE 0x00
49 
50 // Privacy flag
51 #define PERI_PRIVACY_FLAG_ON 1
52 
67 #define GGS_DEVICE_NAME_ATT 0
68 
75 #define GGS_APPEARANCE_ATT 1
76 
83 #define GGS_PERI_CONN_PARAM_ATT 4
84 #if defined ( TESTMODES )
86 #define GGS_W_PERMIT_DEVICE_NAME_ATT 6
87 #define GGS_W_PERMIT_APPEARANCE_ATT 7
88 #endif // TESTMODES
89 
100 #define GGS_CENT_ADDR_RES_ATT 9
101 
111 #define GGS_RESOLVABLE_PRIVATE_ADDRESS_ONLY_ATT 10
112 
123 #define GGS_PERI_PRIVACY_FLAG 11
124 
127 // GAP Services bit fields
129 #define GAP_SERVICE 0x00000001
130 
131 // GGS TestModes
132 #if defined ( TESTMODES )
133 #define GGS_TESTMODE_OFF 0
135 #define GGS_TESTMODE_W_PERMIT_DEVICE_NAME 1
137 #define GGS_TESTMODE_W_PERMIT_APPEARANCE 2
139 
143 #define GGS_TESTMODE_TOGGLE_CAR_VALUE 3
144 #endif // TESTMODES
145 
147 /*********************************************************************
148  * TYPEDEFS
149  */
150 
152 typedef void (*ggsAttrValueChange_t)
153 (
154  uint16 connHandle,
155  uint8 attrId
156 );
157 
158 // GAP GATT Server callback structure
159 typedef struct
160 {
161  ggsAttrValueChange_t pfnAttrValueChange; // When attribute value is changed OTA
162 } ggsAppCBs_t;
163 
164 /*********************************************************************
165  * API FUNCTIONS
166  */
167 
179 extern bStatus_t GGS_SetParameter( uint8 param, uint8 len, void *value );
180 
191 extern bStatus_t GGS_GetParameter( uint8 param, void *value );
192 
204 extern bStatus_t GGS_AddService( uint32 services );
205 
215 extern bStatus_t GGS_DelService( uint32 services );
216 
226 extern void GGS_RegisterAppCBs( ggsAppCBs_t *appCallbacks );
227 
235 extern void GGS_SetParamValue( uint16 value );
236 
242 extern uint16 GGS_GetParamValue( void );
243 
244 /*********************************************************************
245 *********************************************************************/
246 
247 #ifdef __cplusplus
248 }
249 #endif
250 
251 #endif /* GAPGATTSERVER_H */
252 
uint16 GGS_GetParamValue(void)
bStatus_t GGS_GetParameter(uint8 param, void *value)
void(* ggsAttrValueChange_t)(uint16 connHandle, uint8 attrId)
Callback to notify when attribute value is changed over the air.
Definition: gapgattserver.h:153
void GGS_RegisterAppCBs(ggsAppCBs_t *appCallbacks)
bStatus_t GGS_DelService(uint32 services)
bStatus_t GGS_AddService(uint32 services)
void GGS_SetParamValue(uint16 value)
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:242
bStatus_t GGS_SetParameter(uint8 param, uint8 len, void *value)
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale