Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.60
GATT Client and Server Functions

General Description

These are APIs common to both GATT Client role and GATT Server role.

You may use them in either roles.

No letter is appended to the API name: Cy_BLE_GATT_

Macros

#define Cy_BLE_GATT_GetBusyStatus(attId)   (cy_ble_busyStatus[attId])
 This function returns a status of the BLE Stack (busy or not busy). More...
 

Functions

cy_en_ble_api_result_t Cy_BLE_GATT_GetMtuSize (cy_stc_ble_gatt_xchg_mtu_param_t *param)
 This function provides the GATT MTU size used by BLE Stack. More...
 

Macro Definition Documentation

◆ Cy_BLE_GATT_GetBusyStatus

#define Cy_BLE_GATT_GetBusyStatus (   attId)    (cy_ble_busyStatus[attId])

This function returns a status of the BLE Stack (busy or not busy).

The status is changed after the CY_BLE_EVT_STACK_BUSY_STATUS event.

Parameters
attIdIdentifies the active ATT connection Instance.
Returns
uint8_t: The busy status.
  • CY_BLE_STACK_STATE_BUSY - The BLE Stack is busy.
  • CY_BLE_STACK_STATE_FREE - The BLE Stack is not busy.

Function Documentation

◆ Cy_BLE_GATT_GetMtuSize()

cy_en_ble_api_result_t Cy_BLE_GATT_GetMtuSize ( cy_stc_ble_gatt_xchg_mtu_param_t param)

This function provides the GATT MTU size used by BLE Stack.

If this function is called after the GATT MTU Exchange procedure, it will provide the negotiated MTU size (Minimum(Server Rx MTU, Client Rx MTU)), or else it will provide the default MTU size (23 bytes). This is a blocking function. No event is generated on calling this function.

Parameters
paramA pointer of type 'cy_stc_ble_gatt_xchg_mtu_param_t'. param->connHandle: input parameter
param->mtu: output parameter
Returns
cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. Following are the possible error codes.
Errors codes Description
CY_BLE_SUCCESS On successful operation
CY_BLE_ERROR_INVALID_PARAMETER If a NULL or an invalid connection handle was passed