Cypress PSoC 6 Bluetooth Low Energy Middleware Library 3.60

General Description

API unique to TPS designs configured as a GATT Client role.

A letter 'c' is appended to the API name: Cy_BLE_TPSC_

Functions

cy_en_ble_api_result_t Cy_BLE_TPSC_GetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_tps_char_index_t charIndex)
 Gets the characteristic value of the Tx Power service, which is identified by charIndex. More...
 
cy_en_ble_api_result_t Cy_BLE_TPSC_SetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_tps_char_index_t charIndex, cy_en_ble_tps_char_descriptors_t descrIndex, uint8_t attrSize, uint8_t *attrValue)
 Sets a characteristic descriptor value of the Tx Power service. More...
 
cy_en_ble_api_result_t Cy_BLE_TPSC_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_tps_char_index_t charIndex, cy_en_ble_tps_char_descriptors_t descrIndex)
 Gets a characteristic descriptor of the Tx Power service. More...
 

Function Documentation

◆ Cy_BLE_TPSC_GetCharacteristicValue()

cy_en_ble_api_result_t Cy_BLE_TPSC_GetCharacteristicValue ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_tps_char_index_t  charIndex 
)

Gets the characteristic value of the Tx Power service, which is identified by charIndex.

This function call can result in generation of the following events based on the response from the server device:

Parameters
connHandleThe connection handle.
charIndexThe index of the characteristic.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The Read Request was sent successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_INVALID_OPERATION Operation is invalid for this characteristic.
CY_BLE_ERROR_INVALID_STATE Connection with the server is not established.
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED Memory allocation failed.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE The peer device doesn't have the particular characteristic.
Events
If execution is successful (return value = CY_BLE_SUCCESS) these events can appear:
If the TPS service-specific callback is registered (with Cy_BLE_TPS_RegisterAttrCallback): Otherwise (if a TPS service-specific callback is not registered):

◆ Cy_BLE_TPSC_SetCharacteristicDescriptor()

cy_en_ble_api_result_t Cy_BLE_TPSC_SetCharacteristicDescriptor ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_tps_char_index_t  charIndex,
cy_en_ble_tps_char_descriptors_t  descrIndex,
uint8_t  attrSize,
uint8_t *  attrValue 
)

Sets a characteristic descriptor value of the Tx Power service.

Internally, Write Request is sent to the GATT Server and on successful execution of the request on the server side, the following events can be generated:

Parameters
connHandleThe connection handle.
charIndexThe index of the Characteristic
descrIndexThe index of the TX Power service characteristic descriptor.
attrSizeThe size of the characteristic descriptor attribute.
attrValueThe pointer to the characteristic descriptor value data that should be sent to the server device.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was sent successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_INVALID_OPERATION Operation is invalid for this characteristic.
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE The peer device doesn't have the particular characteristic.
CY_BLE_ERROR_INVALID_STATE Connection with the server is not established.
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED Memory allocation failed.
Events
If execution is successful (return value = CY_BLE_SUCCESS), these events can appear:
If a TPS service-specific callback is registered with Cy_BLE_TPS_RegisterAttrCallback(): Otherwise (if a TPS service-specific callback is not registered):

◆ Cy_BLE_TPSC_GetCharacteristicDescriptor()

cy_en_ble_api_result_t Cy_BLE_TPSC_GetCharacteristicDescriptor ( cy_stc_ble_conn_handle_t  connHandle,
cy_en_ble_tps_char_index_t  charIndex,
cy_en_ble_tps_char_descriptors_t  descrIndex 
)

Gets a characteristic descriptor of the Tx Power service.

This function call can result in generation of the following events based on the response from the server device:

Parameters
connHandleThe connection handle.
charIndexThe index of the characteristic.
descrIndexThe index of the characteristic descriptor.
Returns
A return value of type cy_en_ble_api_result_t.
Error Codes Description
CY_BLE_SUCCESS The request was sent successfully.
CY_BLE_ERROR_INVALID_PARAMETER Validation of the input parameter failed.
CY_BLE_ERROR_INVALID_OPERATION Operation is invalid for this characteristic.
CY_BLE_ERROR_INVALID_STATE Connection with the server is not established.
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED Memory allocation failed.
Events
If execution is successful (return value = CY_BLE_SUCCESS), these events can appear:
If a TPS service-specific callback is registered (with Cy_BLE_TPS_RegisterAttrCallback): Otherwise (if a TPS service-specific callback is not registered):