API unique to HPS designs configured as a GATT Client role.
A letter 'c' is appended to the API name: Cy_BLE_HPSC_
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_SetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex, uint16_t attrSize, uint8_t *attrValue) |
| This function is used to write the characteristic (which is identified by charIndex) value attribute in the server. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_GetCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex) |
| Sends a request to the peer device to get a characteristic value, as identified by its charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_SetLongCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex, uint16_t attrSize, uint8_t *attrValue) |
| Sends a request to set a long characteristic value of the service, which is a value identified by charIndex, to the server's device. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_GetLongCharacteristicValue (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex, uint16_t attrSize, uint8_t *attrValue) |
| This function is used to read a long characteristic value, which is a value identified by charIndex, from the server. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_SetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex, cy_en_ble_hps_descr_index_t descrIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function is used to write the characteristic descriptor to the server, which is identified by charIndex and descrIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HPSC_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_hps_char_index_t charIndex, cy_en_ble_hps_descr_index_t descrIndex) |
| Sends a request to get the characteristic descriptor of the specified characteristic of the service. More...
|
|
◆ Cy_BLE_HPSC_SetCharacteristicValue()
This function is used to write the characteristic (which is identified by charIndex) value attribute in the server.
As a result a Write Request is sent to the GATT Server and on successful execution of the request on the server side, the CY_BLE_EVT_HPSS_WRITE_CHAR event is generated. On successful request execution on the server side, the Write Response is sent to the client.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_hps_char_index_t. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic 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
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if the HPS service-specific callback is not registered):
◆ Cy_BLE_HPSC_GetCharacteristicValue()
Sends a request to the peer device to get a characteristic value, as identified by its charIndex.
- Parameters
-
- 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. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if an HPS service-specific callback is not registered):
◆ Cy_BLE_HPSC_SetLongCharacteristicValue()
Sends a request to set a long characteristic value of the service, which is a value identified by charIndex, to the server's device.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_hps_char_index_t. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic 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
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if the HPS service-specific callback is not registered):
◆ Cy_BLE_HPSC_GetLongCharacteristicValue()
This function is used to read a long characteristic value, which is a value identified by charIndex, from the server.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_hps_char_index_t. |
attrSize | The size of the buffer to store long characteristic value. |
attrValue | The pointer to the buffer where the read long characteristic value should be stored. |
- 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. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if an HPS service-specific callback is not registered):
◆ Cy_BLE_HPSC_SetCharacteristicDescriptor()
This function is used to write the characteristic descriptor to the server, which is identified by charIndex and descrIndex.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_hps_char_index_t. |
descrIndex | The index of the service characteristic descriptor of type cy_en_ble_hps_descr_index_t.* |
attrSize | The size of the characteristic value attribute. |
attrValue | The 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_INVALID_STATE | The state is not valid. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if an HPS service-specific callback is not registered):
◆ Cy_BLE_HPSC_GetCharacteristicDescriptor()
Sends a request to get the characteristic descriptor of the specified characteristic of the service.
- Parameters
-
- 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 | This operation is not permitted on the specified attribute. |
CY_BLE_ERROR_INVALID_STATE | The state is not valid. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
- Events
- In case of successful execution (return value = CY_BLE_SUCCESS) the following events can appear:
If the HPS service-specific callback is registered with Cy_BLE_HPS_RegisterAttrCallback():
Otherwise (if an HPS service-specific callback is not registered):