Microchip® Advanced Software Framework

alert_notificaition_app.c File Reference

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 void app_connected_state ( bool  connected)
static

app_connected_state profile notifies the application about state

Parameters
[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().

static void timer_callback_handler ( void  )
static

Timer Callback.

const ble_custom_event_cb_t anp_custom_event_cb
static
Initial value:
= {
.custom_event = anp_custom_event
}
static at_ble_status_t anp_custom_event(void *param)
Definition: alert_notificaition_app.c:220
gatt_anp_handler_t anp_handle
user_custom_event_t app_button_event
Initial value:
=
{
.bptr = NULL
}
#define APP_BUTTON_EVENT_ID
Definition: alert_notificaition_app.c:177
#define NULL
Definition: nm_bsp.h:64
volatile bool app_init_done = false
volatile bool app_state = false

Initialize the service with its included service, characteristics, and descriptors.

Parameters
[in]scan_paramgatt service information
Returns
none
volatile bool notification_enable = false

Referenced by anp_custom_event().

volatile bool user_request = false