Functions | |
void | prf_pack_char_pres_fmt (uint8_t *p_packed_val, const prf_char_pres_fmt_t *p_char_pres_fmt) |
Pack Characteristic Presentation Format descriptor value to a buffer. More... | |
void | prf_unpack_char_pres_fmt (const uint8_t *p_packed_val, prf_char_pres_fmt_t *p_char_pres_fmt) |
Unpack the data in a buffer to the structure of Characteristic Presentation Format descriptor value. More... | |
uint8_t | prf_pack_date_time (uint8_t *p_packed_val, const prf_date_time_t *p_date_time) |
Pack the value in date-time structure to a buffer. More... | |
uint8_t | prf_unpack_date_time (const uint8_t *p_packed_val, prf_date_time_t *p_date_time) |
Unpack the data in buffer to the date-time structure. More... | |
uint8_t | prf_find_idx_by_handle (uint16_t handle, uint16_t start_hdl, uint8_t char_nb, uint8_t *p_char_mask) |
Find the attribute index by handle. More... | |
uint16_t | prf_find_handle_by_idx (uint8_t idx, uint16_t start_hdl, uint8_t *p_char_mask) |
Find the attribute handle by index. More... | |
bool | prf_is_cccd_value_valid (uint16_t cccd_value) |
Check if a CCCD value is valid. More... | |
bool | prf_is_notification_enabled (uint16_t cccd_value) |
Check if a CCCD value is notification enabled. More... | |
bool | prf_is_indication_enabled (uint16_t cccd_value) |
Check if a CCCD value is indication enabled. More... | |
uint16_t prf_find_handle_by_idx | ( | uint8_t | idx, |
uint16_t | start_hdl, | ||
uint8_t * | p_char_mask | ||
) |
Find the attribute handle by index.
[in] | idx | The attribute index in the service's attribute table. |
[in] | start_hdl | The start handle value in the database. |
[in] | p_char_mask | Pointer to the mask of characteristics which are added into BLE Stack database from the service's attribute table. |
uint8_t prf_find_idx_by_handle | ( | uint16_t | handle, |
uint16_t | start_hdl, | ||
uint8_t | char_nb, | ||
uint8_t * | p_char_mask | ||
) |
Find the attribute index by handle.
[in] | handle | The handle of a characteristic in BLE Stack database. |
[in] | start_hdl | The start handle of a service in BLE Stack database. |
[in] | char_nb | The number of the characteristics in a service's attribute table. |
[in] | p_char_mask | Pointer to the mask of characteristics which are added into BLE Stack database from the service's attribute table. |
bool prf_is_cccd_value_valid | ( | uint16_t | cccd_value | ) |
Check if a CCCD value is valid.
[in] | cccd_value | The CCCD value to be checked. |
bool prf_is_indication_enabled | ( | uint16_t | cccd_value | ) |
Check if a CCCD value is indication enabled.
[in] | cccd_value | The CCCD value to be checked |
bool prf_is_notification_enabled | ( | uint16_t | cccd_value | ) |
Check if a CCCD value is notification enabled.
[in] | cccd_value | The CCCD value to be checked. |
void prf_pack_char_pres_fmt | ( | uint8_t * | p_packed_val, |
const prf_char_pres_fmt_t * | p_char_pres_fmt | ||
) |
Pack Characteristic Presentation Format descriptor value to a buffer.
[out] | p_packed_val | Pointer to the packed buffer. |
[in] | p_char_pres_fmt | Pointer to the structure of Characteristic Presentation Format value. See prf_char_pres_fmt_t. |
uint8_t prf_pack_date_time | ( | uint8_t * | p_packed_val, |
const prf_date_time_t * | p_date_time | ||
) |
Pack the value in date-time structure to a buffer.
[out] | p_packed_val | Pointer to a packed buffer. |
[in] | p_date_time | Pointer to the date-time structure, see prf_date_time_t. |
void prf_unpack_char_pres_fmt | ( | const uint8_t * | p_packed_val, |
prf_char_pres_fmt_t * | p_char_pres_fmt | ||
) |
Unpack the data in a buffer to the structure of Characteristic Presentation Format descriptor value.
[in] | p_packed_val | Pointer to the packed buffer. |
[out] | p_char_pres_fmt | Pointer to the structure of Characteristic Presentation Format value. See prf_char_pres_fmt_t. |
uint8_t prf_unpack_date_time | ( | const uint8_t * | p_packed_val, |
prf_date_time_t * | p_date_time | ||
) |
Unpack the data in buffer to the date-time structure.
[in] | p_packed_val | Pointer to the packed buffer. |
[out] | p_date_time | Pointer to date-time structure, see prf_date_time_t. |