BLE_API  v2.1.3

Typedefs

typedef void(* BleGATT_EventCallBack) (uint8_t hostId, uint8_t cmdAccess, uint8_t *data, uint16_t length)
 

Functions

BleStackStatus setGATT_ServiceInit (uint8_t hostId, BleGattRole gattRole, BLEATT_GATT_Info *info, BleGATT_EventCallBack callback)
 
BleStackStatus getGATT_ServiceHandles (uint8_t hostId, BLEATT_GATT_Info *info)
 

Detailed Description

Here shows the definitions of the GATT for application uses.

Typedef Documentation

◆ BleGATT_EventCallBack

typedef void(* BleGATT_EventCallBack) (uint8_t hostId, uint8_t cmdAccess, uint8_t *data, uint16_t length)

BleGATT_EventCallBack

Note
This callback receives the GATT service events. Each of these events can be associated with parameters.

Function Documentation

◆ getGATT_ServiceHandles()

BleStackStatus getGATT_ServiceHandles ( uint8_t  hostId,
BLEATT_GATT_Info info 
)

Get GATT Service Handle Numbers

Attention
Parameters
[in]hostId: the link's host id.
[out]info: a pointer to GATT information
Return values
BLESTACK_STATUS_ERR_INVALID_HOSTID: Error host id.
BLESTACK_STATUS_ERR_INVALID_PARAM: Invalid parameter.
BLESTACK_STATUS_SUCCESS: Setting success.

◆ setGATT_ServiceInit()

BleStackStatus setGATT_ServiceInit ( uint8_t  hostId,
BleGattRole  gattRole,
BLEATT_GATT_Info info,
BleGATT_EventCallBack  callback 
)

GATT Service Initialization

Parameters
[in]hostId: the link's host id.
[in]gattRole: BLE GATT role.
[in]info: a pointer to GATT information.
[in]callback: a pointer to a callback function that receive the service events.
Return values
BLESTACK_STATUS_ERR_INVALID_HOSTID: Error host id.
BLESTACK_STATUS_ERR_INVALID_PARAM: Invalid parameter.
BLESTACK_STATUS_ERR_NOT_SUPPORTED: Registered services buffer full.
BLESTACK_STATUS_SUCCESS: Setting success.