These are API 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_RTUS_
◆ Cy_BLE_RTUSS_Init()
This function initializes server of the Reference Time Update service.
- Parameters
-
config | Configuration structure for the RTUS. |
- Returns
- cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. The following are possible error codes.
Error Codes | Description |
CY_BLE_SUCCESS | The function completed successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | On specifying NULL as input parameter. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Buffer overflow in the registration callback. |
◆ Cy_BLE_RTUSC_Init()
This function initializes client of the Reference Time Update service.
- Parameters
-
config | Configuration structure for the RTUS. |
- Returns
- cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. The following are possible error codes.
Error Codes | Description |
CY_BLE_SUCCESS | The function completed successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | On specifying NULL as input parameter. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Buffer overflow in the registration callback. |
◆ Cy_BLE_RTUS_RegisterAttrCallback()
Registers a callback function for Reference Time Update Service-specific attribute operations.
Service-specific Write Requests from peer device will not be handled with unregistered callback function.
- Parameters
-
callbackFunc | An application layer event callback function to receive events from the PSoC 6 BLE Middleware. The definition of cy_ble_callback_t for RTUS is:
typedef void (* cy_ble_callback_t) (uint32_t eventCode, void *eventParam)
- eventCode indicates the event that triggered this callback.
- eventParam contains the parameters corresponding to the current event.
|
- Returns
- cy_en_ble_api_result_t : Return value indicates whether the function succeeded or failed. The following are possible error codes:
Error Codes | Description |
CY_BLE_SUCCESS | The function completed successfully. |
CY_BLE_ERROR_INVALID_OPERATION | This operation is not permitted |