ANCS Service Declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | gatt_anp_handler |
Macros | |
#define | ALERT_CONTRL_POINT_READ (3) |
#define | ANP_INVALID_CHAR_HANDLE (0) |
#define | ANP_READ_LENGTH (20) |
#define | ANP_READ_OFFSET (0) |
#define | ANS_ALERT_NP_READ_LENGTH (20) |
#define | ANS_NEW_ALERT_READ_LENGTH (20) |
#define | ANS_SUP_NEW_READ_LENGTH (20) |
#define | ANS_SUP_UNREA_READ_LENGTH (20) |
#define | ANS_UNREA_ALERT_READ_LENGTH (20) |
#define | BIT_MASK0 (1) |
#define | BIT_MASK1 (1 << 1) |
#define | BIT_MASK2 (1 << 2) |
#define | BIT_MASK3 (1 << 3) |
#define | BIT_MASK4 (1 << 4) |
#define | BIT_MASK5 (1 << 5) |
#define | BIT_MASK6 (1 << 6) |
#define | BIT_MASK7 (1 << 7) |
#define | SUPPORTED_NEW_ALERT_READ (1) |
#define | SUPPORTED_UNREAD_ALERT_READ (2) |
Typedefs | |
typedef struct gatt_anp_handler | gatt_anp_handler_t |
Functions | |
at_ble_status_t | anp_alert_noti (at_ble_handle_t conn_handle, at_ble_handle_t desc_handle, bool noti) |
invoked by the profile for enabling or disabling notifications More... | |
void | anp_alert_notify_response (at_ble_notification_recieved_t *notify_resp, gatt_anp_handler_t *anp_handler) |
anp_alert_notify_response invoked by the profile after receiving notifications More... | |
at_ble_status_t | anp_alert_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle) |
anp_alert_read invoked by ble manager More... | |
uint8_t | anp_alert_read_response (at_ble_characteristic_read_response_t *read_resp, gatt_anp_handler_t *anp_handler) |
anp_alert_read_response invoked by the profile once it receives read response More... | |
#define ALERT_CONTRL_POINT_READ (3) |
Referenced by anp_alert_read_response().
#define ANP_INVALID_CHAR_HANDLE (0) |
Referenced by anp_alert_noti(), and anp_alert_read().
#define ANP_READ_LENGTH (20) |
Referenced by anp_alert_read().
#define ANP_READ_OFFSET (0) |
Referenced by anp_alert_read().
#define ANS_ALERT_NP_READ_LENGTH (20) |
#define ANS_NEW_ALERT_READ_LENGTH (20) |
#define ANS_SUP_NEW_READ_LENGTH (20) |
#define ANS_SUP_UNREA_READ_LENGTH (20) |
#define ANS_UNREA_ALERT_READ_LENGTH (20) |
#define BIT_MASK0 (1) |
Referenced by anp_alert_category().
#define BIT_MASK1 (1 << 1) |
Referenced by anp_alert_category().
#define BIT_MASK2 (1 << 2) |
Referenced by anp_alert_category().
#define BIT_MASK3 (1 << 3) |
Referenced by anp_alert_category().
#define BIT_MASK4 (1 << 4) |
Referenced by anp_alert_category().
#define BIT_MASK5 (1 << 5) |
Referenced by anp_alert_category().
#define BIT_MASK6 (1 << 6) |
Referenced by anp_alert_category().
#define BIT_MASK7 (1 << 7) |
Referenced by anp_alert_category().
#define SUPPORTED_NEW_ALERT_READ (1) |
Referenced by anp_alert_read_response(), and anp_client_read_response_handler().
#define SUPPORTED_UNREAD_ALERT_READ (2) |
Referenced by anp_alert_read_response(), and anp_client_read_response_handler().
typedef struct gatt_anp_handler gatt_anp_handler_t |
at_ble_status_t anp_alert_noti | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | desc_handle, | ||
bool | noti | ||
) |
invoked by the profile for enabling or disabling notifications
[in] | at_ble_handle_t | connection handle |
[in] | at_ble_handle_t | descriptor handle |
[in] | true | for enabling notification false for disabling notifications |
invoked by the profile for enabling or disabling notifications
[in] | at_ble_handle_t | connection handle |
[in] | at_ble_handle_t | descriptor handle |
[in] | true | for enabling notification false for disabling notifications |
References ANP_INVALID_CHAR_HANDLE, AT_BLE_ATT_INVALID_HANDLE, at_ble_characteristic_write(), and AT_BLE_SUCCESS.
Referenced by anp_client_disable_notification(), and anp_client_write_notification_handler().
void anp_alert_notify_response | ( | at_ble_notification_recieved_t * | notify_resp, |
gatt_anp_handler_t * | anp_handler | ||
) |
anp_alert_notify_response invoked by the profile after receiving notifications
[in] | at_ble_notification_recieved_t | consists of characteristic handle and new value |
[in] | gatt_anp_handler_t | anp service information in peer device |
References anp_alert_type(), at_ble_notification_recieved_t::char_handle, at_ble_notification_recieved_t::char_len, at_ble_notification_recieved_t::char_value, DBG_LOG, DBG_LOG_DEV, gatt_anp_handler::new_alert_char_handle, and gatt_anp_handler::unread_alert_char_handle.
Referenced by anp_client_notification_handler().
at_ble_status_t anp_alert_read | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_handle | ||
) |
anp_alert_read invoked by ble manager
[in] | at_ble_handle_t | consists of connection handle |
[in] | at_ble_handle_t | consists of char handle |
References ANP_INVALID_CHAR_HANDLE, ANP_READ_LENGTH, ANP_READ_OFFSET, AT_BLE_ATT_INVALID_HANDLE, and at_ble_characteristic_read().
Referenced by anp_client_security_done_handler().
uint8_t anp_alert_read_response | ( | at_ble_characteristic_read_response_t * | read_resp, |
gatt_anp_handler_t * | anp_handler | ||
) |
anp_alert_read_response invoked by the profile once it receives read response
[in] | at_ble_characteristic_read_response_t | consists of characteristic handle value handle |
[in] | gatt_anp_handler_t | consists all anp service related handles |
References ALERT_CONTRL_POINT_READ, gatt_anp_handler::alert_np_char_handle, anp_alert_category(), at_ble_characteristic_read_response_t::char_handle, at_ble_characteristic_read_response_t::char_len, at_ble_characteristic_read_response_t::char_value, DBG_LOG, DBG_LOG_DEV, gatt_anp_handler::supp_new_char_handle, gatt_anp_handler::supp_unread_char_handle, SUPPORTED_NEW_ALERT_READ, and SUPPORTED_UNREAD_ALERT_READ.
Referenced by anp_client_read_response_handler().