API unique to HID designs configured as a GATT Server role.
A letter 's' is appended to the API name: Cy_BLE_HIDSS_
|
cy_en_ble_api_result_t | Cy_BLE_HIDSS_SetCharacteristicValue (uint8_t serviceIndex, cy_en_ble_hids_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| Sets a characteristic value of HID service, which is a value identified by charIndex, to the local database. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HIDSS_GetCharacteristicValue (uint8_t serviceIndex, cy_en_ble_hids_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| Gets local characteristic value of the specified HID service characteristics. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HIDSS_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, uint8_t serviceIndex, cy_en_ble_hids_char_index_t charIndex, cy_en_ble_hids_descr_t descrIndex, uint8_t attrSize, uint8_t *attrValue) |
| Gets local characteristic descriptor of the specified HID service characteristic. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_HIDSS_SendNotification (cy_stc_ble_conn_handle_t connHandle, uint8_t serviceIndex, cy_en_ble_hids_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| Sends specified HID service characteristic notification to the client device. More...
|
|
◆ Cy_BLE_HIDSS_SetCharacteristicValue()
Sets a characteristic value of HID service, which is a value identified by charIndex, to the local database.
- Parameters
-
serviceIndex | The index of the service instance. e.g. If two HID services are supported in your design, then first service will be identified by serviceIndex of 0 and the second by serviceIndex of 1. |
charIndex | The index of the service characteristic of type cy_en_ble_hids_char_index_t. The valid values are,
|
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be stored in the GATT database. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | An optional characteristic is absent. |
◆ Cy_BLE_HIDSS_GetCharacteristicValue()
Gets local characteristic value of the specified HID service characteristics.
The value is identified by charIndex.
- Parameters
-
serviceIndex | The index of the service instance. e.g. If two HID services are supported in your design, then first service will be identified by serviceIndex of 0 and the second by serviceIndex of 1. |
charIndex | The index of the service characteristic of type cy_en_ble_hids_char_index_t. The valid values are,
|
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the location where characteristic value data should be stored. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The characteristic value was read successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | Optional characteristic is absent |
◆ Cy_BLE_HIDSS_GetCharacteristicDescriptor()
Gets local characteristic descriptor of the specified HID service characteristic.
- Parameters
-
connHandle | BLE peer device connection handle. |
serviceIndex | The index of the service instance. e.g. If two HID services are supported in your design, then first service will be identified by serviceIndex of 0 and the second by serviceIndex of 1. |
charIndex | The index of the service characteristic of type cy_en_ble_hids_char_index_t. The valid values are,
|
descrIndex | The index of the service characteristic descriptor of type cy_en_ble_hids_descr_t. The valid values are,
|
attrSize | The size of the descriptor value attribute. |
attrValue | The pointer to the location where characteristic descriptor value data should be stored. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The characteristic descriptor value was read successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | Optional descriptor is absent |
◆ Cy_BLE_HIDSS_SendNotification()
Sends specified HID service characteristic notification to the client device.
CY_BLE_EVT_HIDSC_NOTIFICATION event is received by the peer device, on invoking this function. On enabling notification successfully for a service characteristic it sends out a 'Handle Value Notification' which results in CY_BLE_EVT_HIDSC_NOTIFICATION event at the GATT Client's end.
- Parameters
-
connHandle | BLE peer device connection handle. |
serviceIndex | The index of the HID service instance. e.g. If two HID services are supported in your design, then first service will be identified by serviceIndex of 0 and the second by serviceIndex of 1. |
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | Pointer to the characteristic value data that should be sent to the client device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled 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 | An optional characteristic is absent. |
CY_BLE_ERROR_INVALID_STATE | Connection with the client is not established. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_NTF_DISABLED | Notification is not enabled by the client. |