Alert Notification Application.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "console_serial.h"
#include "at_ble_api.h"
#include "at_ble_errno.h"
#include "at_ble_trace.h"
#include "platform.h"
#include "timer_hw.h"
#include "conf_extint.h"
#include "ble_manager.h"
#include "alert_notification.h"
#include "alert_notification_profile.h"
Macros | |
#define | APP_BUTTON_EVENT_ID (1) |
Functions | |
static at_ble_status_t | anp_custom_event (void *param) |
static void | app_connected_state (bool connected) |
app_connected_state profile notifies the application about state More... | |
void | button_cb (void) |
Button Press Callback. More... | |
int | main (void) |
static void | timer_callback_handler (void) |
Timer Callback. More... | |
Variables | |
static const ble_custom_event_cb_t | anp_custom_event_cb |
gatt_anp_handler_t | anp_handle |
user_custom_event_t | app_button_event |
volatile bool | app_init_done = false |
volatile bool | app_state = false |
ble_connected_dev_info_t | ble_dev_info [BLE_MAX_DEVICE_CONNECTION] |
Initialize the service with its included service, characteristics, and descriptors. More... | |
volatile bool | notification_enable = false |
volatile bool | user_request = false |
#define APP_BUTTON_EVENT_ID (1) |
Referenced by anp_custom_event().
|
static |
|
static |
app_connected_state profile notifies the application about state
[in] | connected |
References anp_client_adv(), app_state, and DBG_LOG_DEV.
Referenced by main().
void button_cb | ( | void | ) |
Button Press Callback.
References app_init_done, and at_ble_event_user_defined_post().
int main | ( | void | ) |
References anp_client_adv(), anp_client_init(), app_connected_state(), app_init_done, BLE_CUSTOM_EVENT_TYPE, ble_device_init(), ble_event_task(), ble_mgr_events_callback_handler(), board_init(), DBG_LOG, hw_timer_init(), hw_timer_register_callback(), NULL, REGISTER_CALL_BACK, register_connected_callback(), serial_console_init(), system_init(), and timer_callback_handler().
|
static |
Timer Callback.
|
static |
gatt_anp_handler_t anp_handle |
user_custom_event_t app_button_event |
ble_connected_dev_info_t ble_dev_info[BLE_MAX_DEVICE_CONNECTION] |
Initialize the service with its included service, characteristics, and descriptors.
[in] | scan_param | gatt service information |
Referenced by anp_custom_event().