ANCS Profile.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <string.h>
#include "at_ble_api.h"
#include "ble_manager.h"
#include "ble_utils.h"
#include "ancs_profile.h"
#include "ancs.h"
Variables | |
ancs_prf_t | ancs_data |
static const ble_gap_event_cb_t | ancs_gap_handle |
static const ble_gatt_client_event_cb_t | ancs_gatt_client_handle |
app_anp_data_t | app_anp_info |
void anp_client_adv | ( | void | ) |
anp_client_adv sets the advertisement data and starts advertisement
does all the profile initialization and starts the advertisement
Referenced by app_connected_state(), app_disconnected_event_handler(), and main().
void anp_client_char_changed_handler | ( | at_ble_characteristic_changed_t * | params | ) |
Handler for char changed handler.
[in] | characteristic | changed event parameter containing details like characteristic handle,value |
at_ble_status_t anp_client_characteristic_found_handler | ( | void * | params | ) |
Handler for characteristic found event.
[in] | characteristic | found event parameter containing details like characteristic handle,uuid |
at_ble_status_t anp_client_connected_state_handler | ( | void * | params | ) |
Handler for connection event.
[in] | connected | event parameter containing details like handle |
References ancs_enable(), ancs_prf::ancs_serv, at_ble_primary_service_discover_by_uuid(), AT_BLE_SUCCESS, app_anp_data::conn_params, DBG_LOG, app_anp_data::devicedb, END_HANDLE, at_ble_connected_t::handle, at_ble_primary_service_found_t::service_uuid, START_HANDLE, and status.
at_ble_status_t anp_client_descriptor_found_handler | ( | void * | params | ) |
Handler for descriptor found event.
[in] | descriptor | found event parameter containing details like descriptor handle,uuid |
at_ble_status_t anp_client_disconnected_event_handler | ( | void * | params | ) |
Handler for disconnection event.
[in] | disconnected | event parameter containing details like handle |
at_ble_status_t anp_client_discovery_complete_handler | ( | void * | params | ) |
Handler for discovery complete event.
[in] | discovery | complete event which contains result of discovery event |
void anp_client_init | ( | void * | params | ) |
invoked by application for initializing the profile
Function used for profile initialization and also enable the advertisement.
Referenced by main().
at_ble_status_t anp_client_notification_handler | ( | void * | params | ) |
Handler for notification event.
[in] | notification | received parameter containing the notification value |
at_ble_status_t anp_client_service_found_handler | ( | void * | params | ) |
Handler for service found event.
[in] | service | found event parameter containing details like service handle,uuid |
at_ble_status_t anp_client_write_notification_handler | ( | void * | param | ) |
Handler for enabling the notification.
References at_ble_characteristic_write(), AT_BLE_FAILURE, AT_BLE_SUCCESS, at_ble_descriptor_found_t::conn_handle, data, DBG_LOG, at_ble_descriptor_found_t::desc_handle, FALSE, ancs_prf::notification_source_desc, TRUE, and UNUSED.
Referenced by anp_client_read_response_handler(), and anp_custom_event().
at_ble_status_t anp_client_write_response_handler | ( | void * | params | ) |
Handler for write response.
[in] | write | response parameter contacting the result of write request |
void anp_info_init | ( | void | ) |
Initializing the info init.
Initialize the profile specific information.
Referenced by anp_client_init().
ancs_prf_t ancs_data |
|
static |
|
static |
app_anp_data_t app_anp_info |