Constants, type definitions and functions that are common to all services.
More...
|
typedef void(* | ble_srv_error_handler_t )(uint32_t nrf_error) |
| Type definition for error handler function which will be called in case of an error in a service or a service library module.
|
|
Constants, type definitions and functions that are common to all services.
#define BLE_CCCD_VALUE_LEN 2 |
The length of a CCCD value.
#define BLE_SRV_ENCODED_REPORT_REF_LEN 2 |
The length of an encoded Report Reference Descriptor.
Function for making UTF-8 structure refer to an ASCII string.
- Parameters
-
[out] | p_utf8 | UTF-8 structure to be set. |
[in] | p_ascii | ASCII string to be referred to. |
static __INLINE bool ble_srv_is_indication_enabled |
( |
uint8_t * |
p_encoded_data | ) |
|
|
static |
Function for decoding a CCCD value, and then testing if indication is enabled.
- Parameters
-
[in] | p_encoded_data | Buffer where the encoded CCCD is stored. |
- Returns
- TRUE if indication is enabled, FALSE otherwise.
static __INLINE bool ble_srv_is_notification_enabled |
( |
uint8_t * |
p_encoded_data | ) |
|
|
static |
Function for decoding a CCCD value, and then testing if notification is enabled.
- Parameters
-
[in] | p_encoded_data | Buffer where the encoded CCCD is stored. |
- Returns
- TRUE if notification is enabled, FALSE otherwise.
uint8_t ble_srv_report_ref_encode |
( |
uint8_t * |
p_encoded_buffer, |
|
|
const ble_srv_report_ref_t * |
p_report_ref |
|
) |
| |
Function for encoding a Report Reference Descriptor.
- Parameters
-
[in] | p_encoded_buffer | The buffer of the encoded data. |
[in] | p_report_ref | Report Reference value to be encoded. |
- Returns
- Length of the encoded data.