API unique to ScPS designs configured as a GATT Server role.
A letter 's' is appended to the API name: Cy_BLE_SCPSS_
|
cy_en_ble_api_result_t | Cy_BLE_SCPSS_SetCharacteristicValue (cy_en_ble_scps_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| Sets a characteristic value of the Scan Parameters service, which is identified by charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_SCPSS_GetCharacteristicValue (cy_en_ble_scps_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| Gets a characteristic value of the Scan Parameters service, which is identified by charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_SCPSS_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_scps_char_index_t charIndex, cy_en_ble_scps_descr_index_t descrIndex, uint8_t attrSize, uint8_t *attrValue) |
| Gets a characteristic descriptor of the specified characteristic of the Scan Parameters service. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_SCPSS_SendNotification (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_scps_char_index_t charIndex, uint8_t attrSize, uint8_t *attrValue) |
| This function notifies the client that the server requires the Scan Interval Window Characteristic to be written with the latest values upon notification. More...
|
|
◆ Cy_BLE_SCPSS_SetCharacteristicValue()
Sets a characteristic value of the Scan Parameters service, which is identified by charIndex.
- Parameters
-
charIndex | The index of the service characteristic.
- CY_BLE_SCPS_SCAN_INT_WIN - The Scan Interval Window characteristic index
- CY_BLE_SCPS_SCAN_REFRESH - The Scan Refresh characteristic index
|
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be stored to 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_SCPSS_GetCharacteristicValue()
Gets a characteristic value of the Scan Parameters service, which is identified by charIndex.
- Parameters
-
charIndex | The index of the service characteristic.
- CY_BLE_SCPS_SCAN_INT_WIN - The Scan Interval Window characteristic index
- CY_BLE_SCPS_SCAN_REFRESH - The Scan Refresh characteristic index
|
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 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_SCPSS_GetCharacteristicDescriptor()
Gets a characteristic descriptor of the specified characteristic of the Scan Parameters service.
- Parameters
-
connHandle | The connection handle |
charIndex | The index of the characteristic.
- CY_BLE_SCPS_SCAN_REFRESH - The Scan Refresh characteristic index
|
descrIndex | The index of the descriptor.
- CY_BLE_SCPS_SCAN_REFRESH_CCCD - The Client Characteristic Configuration descriptor index of the Scan Refresh characteristic
|
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the location where the 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 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 descriptor is absent |
◆ Cy_BLE_SCPSS_SendNotification()
This function notifies the client that the server requires the Scan Interval Window Characteristic to be written with the latest values upon notification.
On enabling notification successfully for a service characteristic it sends out a 'Handle Value Notification' which results in CY_BLE_EVT_SCPSC_NOTIFICATION event at the GATT Client's end.
- Parameters
-
connHandle | The connection handle |
charIndex | The index of the characteristic.
- CY_BLE_SCPS_SCAN_REFRESH - The Scan Refresh characteristic index
|
attrSize | The size of the characteristic value attribute. |
attrValue | The 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_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. |