TI BLE5-Stack API Documentation  1.01.08.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 
112 // GAP Services bit fields
114 #define GAP_SERVICE 0x00000001
115 
116 // GGS TestModes
117 #if defined ( TESTMODES )
118 #define GGS_TESTMODE_OFF 0
120 #define GGS_TESTMODE_W_PERMIT_DEVICE_NAME 1
122 #define GGS_TESTMODE_W_PERMIT_APPEARANCE 2
124 
128 #define GGS_TESTMODE_TOGGLE_CAR_VALUE 3
129 #endif // TESTMODES
130 
132 /*********************************************************************
133  * TYPEDEFS
134  */
135 
137 typedef void (*ggsAttrValueChange_t)
138 (
139  uint16 connHandle,
140  uint8 attrId
141 );
142 
143 // GAP GATT Server callback structure
144 typedef struct
145 {
146  ggsAttrValueChange_t pfnAttrValueChange; // When attribute value is changed OTA
147 } ggsAppCBs_t;
148 
149 /*********************************************************************
150  * API FUNCTIONS
151  */
152 
164 extern bStatus_t GGS_SetParameter( uint8 param, uint8 len, void *value );
165 
176 extern bStatus_t GGS_GetParameter( uint8 param, void *value );
177 
189 extern bStatus_t GGS_AddService( uint32 services );
190 
200 extern bStatus_t GGS_DelService( uint32 services );
201 
211 extern void GGS_RegisterAppCBs( ggsAppCBs_t *appCallbacks );
212 
220 extern void GGS_SetParamValue( uint16 value );
221 
227 extern uint16 GGS_GetParamValue( void );
228 
229 /*********************************************************************
230 *********************************************************************/
231 
232 #ifdef __cplusplus
233 }
234 #endif
235 
236 #endif /* GAPGATTSERVER_H */
237 
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:138
void GGS_RegisterAppCBs(ggsAppCBs_t *appCallbacks)
bStatus_t GGS_DelService(uint32 services)
uint32_t len
Image length in bytes.
Definition: oad_image_header.h:529
bStatus_t GGS_AddService(uint32 services)
void GGS_SetParamValue(uint16 value)
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:249
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