Link Loss Service declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | gatt_lls_char_handler |
Macros | |
#define | LLS_ALERT_LEVEL LLS_HIGH_ALERT |
#define | LLS_CLIENT 0 |
#define | LLS_INVALID_CHAR_HANDLE (0) |
#define | LLS_LEVEL (2) |
#define | LLS_NO_SIGNED_WRITE (false) |
#define | LLS_READ_LENGTH (1) |
#define | LLS_READ_OFFSET (0) |
#define | LLS_READ_RESP_INVALID (-1) |
#define | LLS_SERVER 0 |
#define | LLS_WRITE_LENGTH (1) |
#define | LLS_WRITE_OFFSET (0) |
#define | LLS_WRITE_WITH_RESPONSE (true) |
#define | MAX_LLS_CHAR_SIZE (1) |
Typedefs | |
typedef struct gatt_lls_char_handler | gatt_lls_char_handler_t |
Enumerations | |
enum | link_loss_alert_level_t { LLS_NO_ALERT, LLS_MILD_ALERT, LLS_HIGH_ALERT } |
Functions | |
at_ble_status_t | lls_alert_level_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle) |
Send the Read request to link loss handler Read value will be reported via AT_BLE_CHARACTERISTIC_READ_RESPONSE event. More... | |
at_ble_status_t | lls_alert_level_write (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, link_loss_alert_level_t alert_level) |
write a characteristic to Link Loss Characteristics More... | |
int8_t | lls_alert_read_response (at_ble_characteristic_read_response_t *read_resp, gatt_lls_char_handler_t *lls_handler) |
Read Link Loss Alert Value. More... | |
#define LLS_ALERT_LEVEL LLS_HIGH_ALERT |
Referenced by pxp_monitor_discovery_complete_handler().
#define LLS_CLIENT 0 |
#define LLS_INVALID_CHAR_HANDLE (0) |
Referenced by lls_alert_level_read().
#define LLS_LEVEL (2) |
#define LLS_NO_SIGNED_WRITE (false) |
Referenced by lls_alert_level_write().
#define LLS_READ_LENGTH (1) |
Referenced by lls_alert_level_read(), and lls_alert_read_response().
#define LLS_READ_OFFSET (0) |
Referenced by lls_alert_level_read(), and lls_alert_read_response().
#define LLS_READ_RESP_INVALID (-1) |
Referenced by lls_alert_read_response().
#define LLS_SERVER 0 |
#define LLS_WRITE_LENGTH (1) |
Referenced by lls_alert_level_write().
#define LLS_WRITE_OFFSET (0) |
Referenced by lls_alert_level_write().
#define LLS_WRITE_WITH_RESPONSE (true) |
Referenced by lls_alert_level_write().
#define MAX_LLS_CHAR_SIZE (1) |
typedef struct gatt_lls_char_handler gatt_lls_char_handler_t |
at_ble_status_t lls_alert_level_read | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_handle | ||
) |
Send the Read request to link loss handler Read value will be reported via AT_BLE_CHARACTERISTIC_READ_RESPONSE event.
[in] | conn_handle | handle of the connection |
[in] | char_handle | handle of the characteristic |
References AT_BLE_ATT_INVALID_HANDLE, at_ble_characteristic_read(), LLS_INVALID_CHAR_HANDLE, LLS_READ_LENGTH, and LLS_READ_OFFSET.
at_ble_status_t lls_alert_level_write | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_handle, | ||
link_loss_alert_level_t | alert_level | ||
) |
write a characteristic to Link Loss Characteristics
if with_response is True, write completion will be reported via AT_BLE_CHARACTERISTIC_WRITE_RESPONSE event
[in] | conn_handle | handle of the connection |
[in] | char_handle | handle of the characteristic |
[in] | alert | level need to write |
References at_ble_characteristic_write(), LLS_NO_SIGNED_WRITE, LLS_WRITE_LENGTH, LLS_WRITE_OFFSET, and LLS_WRITE_WITH_RESPONSE.
Referenced by pxp_monitor_app_button_event(), and pxp_monitor_discovery_complete_handler().
int8_t lls_alert_read_response | ( | at_ble_characteristic_read_response_t * | read_resp, |
gatt_lls_char_handler_t * | lls_handler | ||
) |
Read Link Loss Alert Value.
[in] | read_value | read response data available form at_ble_characteristic_read_response_t |
References gatt_lls_char_handler::char_data, gatt_lls_char_handler::char_handle, at_ble_characteristic_read_response_t::char_handle, at_ble_characteristic_read_response_t::char_value, DBG_LOG, DBG_LOG_CONT, LLS_HIGH_ALERT, LLS_MILD_ALERT, LLS_NO_ALERT, LLS_READ_LENGTH, LLS_READ_OFFSET, and LLS_READ_RESP_INVALID.
Referenced by pxp_monitor_characteristic_read_response().