TI BLE5-Stack API Documentation  2.01.03.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 
64 #define GGS_DEVICE_NAME_ATT 0
65 
72 #define GGS_APPEARANCE_ATT 1
73 
80 #define GGS_PERI_CONN_PARAM_ATT 4
81 #if defined ( TESTMODES )
83 #define GGS_W_PERMIT_DEVICE_NAME_ATT 6
84 #define GGS_W_PERMIT_APPEARANCE_ATT 7
85 #endif // TESTMODES
86 
97 #define GGS_CENT_ADDR_RES_ATT 9
98 
108 #define GGS_RESOLVABLE_PRIVATE_ADDRESS_ONLY_ATT 10
109 
111 // GAP Services bit fields
113 #define GAP_SERVICE 0x00000001
114 
115 // GGS TestModes
116 #if defined ( TESTMODES )
117 #define GGS_TESTMODE_OFF 0
119 #define GGS_TESTMODE_W_PERMIT_DEVICE_NAME 1
121 #define GGS_TESTMODE_W_PERMIT_APPEARANCE 2
123 
127 #define GGS_TESTMODE_TOGGLE_CAR_VALUE 3
128 #endif // TESTMODES
129 
131 /*********************************************************************
132  * TYPEDEFS
133  */
134 
136 typedef void (*ggsAttrValueChange_t)
137 (
138  uint16 connHandle,
139  uint8 attrId
140 );
141 
142 // GAP GATT Server callback structure
143 typedef struct
144 {
145  ggsAttrValueChange_t pfnAttrValueChange; // When attribute value is changed OTA
146 } ggsAppCBs_t;
147 
148 /*********************************************************************
149  * API FUNCTIONS
150  */
151 
163 extern bStatus_t GGS_SetParameter( uint8 param, uint8 len, void *value );
164 
175 extern bStatus_t GGS_GetParameter( uint8 param, void *value );
176 
188 extern bStatus_t GGS_AddService( uint32 services );
189 
199 extern bStatus_t GGS_DelService( uint32 services );
200 
210 extern void GGS_RegisterAppCBs( ggsAppCBs_t *appCallbacks );
211 
219 extern void GGS_SetParamValue( uint16 value );
220 
226 extern uint16 GGS_GetParamValue( void );
227 
228 /*********************************************************************
229 *********************************************************************/
230 
231 #ifdef __cplusplus
232 }
233 #endif
234 
235 #endif /* GAPGATTSERVER_H */
236 
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:137
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:246
bStatus_t GGS_SetParameter(uint8 param, uint8 len, void *value)
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale