This module implements the GAP Attribute Server.
More...
|
| typedef void(* | ggsAttrValueChange_t) (uint16 connHandle, uint8 attrId) |
| | Callback to notify when attribute value is changed over the air. More...
|
| |
This module implements the GAP Attribute Server.
§ GAP_DEVICE_NAME_LEN
| #define GAP_DEVICE_NAME_LEN 31 |
Length of Device Name Attribute value excluding null-terminate char.
§ GAP_PRIVACY_DISABLED
| #define GAP_PRIVACY_DISABLED 0x00 |
Central Address Resolution: Privacy is Disabled.
§ GAP_PRIVACY_ENABLED
| #define GAP_PRIVACY_ENABLED 0x01 |
Central Address Resolution: Privacy is Enabled.
§ GAP_RPA_ONLY_MODE
| #define GAP_RPA_ONLY_MODE 0x00 |
Only Resolvable Private Addresses Shall Be Used.
§ ggsAttrValueChange_t
| typedef void(* ggsAttrValueChange_t) (uint16 connHandle, uint8 attrId) |
Callback to notify when attribute value is changed over the air.
§ GGS_AddService()
Add function for the GAP GATT Service.
- Parameters
-
| services | services to add. This is a bit map and can contain more than one service. |
- Returns
- SUCCESS : Service added successfully.
-
INVALIDPARAMETER : Invalid service field.
-
FAILURE : Not enough attribute handles available.
-
bleMemAllocError : Memory allocation error occurred.
§ GGS_DelService()
Delete function for the GAP GATT Service.
- Parameters
-
| services | services to delete. This is a bit map and can contain more than one service. |
- Returns
- SUCCESS : Service deleted successfully.
-
FAILURE : Service not found.
§ GGS_GetParameter()
| bStatus_t GGS_GetParameter |
( |
uint8 |
param, |
|
|
void * |
value |
|
) |
| |
Get a GAP GATT Server parameter.
- Parameters
-
| param | Profile parameter ID |
| value | pointer to data to use. This is dependent on the parameter ID and will be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16_t pointer) |
- Returns
- bStatus_t
§ GGS_GetParamValue()
| uint16 GGS_GetParamValue |
( |
void |
| ) |
|
Get a GGS Parameter value.
- Returns
- GGS Parameter value
§ GGS_RegisterAppCBs()
Registers the application callback function.
- Note
- Callback registration is needed only when the Device Name is made writable. The application will be notified when the Device Name is changed over the air.
- Parameters
-
| appCallbacks | pointer to application callbacks. |
§ GGS_SetParameter()
| bStatus_t GGS_SetParameter |
( |
uint8 |
param, |
|
|
uint8 |
len, |
|
|
void * |
value |
|
) |
| |
Set a GAP GATT Server parameter.
- Parameters
-
| param | Profile parameter ID |
| len | length of data to write |
| value | pointer to data to write. This is dependent on the parameter ID and will be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16 pointer) |
- Returns
- bStatus_t
§ GGS_SetParamValue()
| void GGS_SetParamValue |
( |
uint16 |
value | ) |
|
Set a GGS Parameter value.
Use this function to change the default GGS parameter values.
- Parameters
-