Microchip® Advanced Software Framework

device_info_app.c File Reference

Device Information Service - Application.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "conf_extint.h"
#include "console_serial.h"
#include "at_ble_api.h"
#include "platform.h"
#include "device_info.h"
#include "device_info_app.h"
#include "timer_hw.h"
#include "ble_utils.h"
#include "ble_manager.h"

Macros

#define APP_TIMER_EVENT_ID   (1)
 
#define FW_VERSION_SIZE   (12)
 

Functions

static at_ble_status_t ble_connected_app_event (void *param)
 
static at_ble_status_t ble_disconnected_app_event (void *param)
 
static at_ble_status_t ble_encryption_app_event (void *param)
 
static at_ble_status_t ble_paired_app_event (void *param)
 
void button_cb (void)
 
static at_ble_status_t device_information_advertise (void)
 
static at_ble_status_t dis_custom_event (void *param)
 
int main (void)
 Information Service Application main function More...
 
static void timer_callback_handler (void)
 callback handler called on timer expiry More...
 

Variables

bool app_exec = true
 
user_custom_event_t app_timer_event
 
static const ble_gap_event_cb_t device_info_app_gap_cb
 
static const ble_custom_event_cb_t device_info_custom_event_cb
 
at_ble_handle_t dis_conn_handle
 
dis_gatt_service_handler_t dis_service_handler
 
uint8_t fw_version [FW_VERSION_SIZE]
 

#define APP_TIMER_EVENT_ID   (1)

Referenced by dis_custom_event().

#define FW_VERSION_SIZE   (12)

static at_ble_status_t ble_connected_app_event ( void *  param)
static
static at_ble_status_t ble_disconnected_app_event ( void *  param)
static
static at_ble_status_t ble_encryption_app_event ( void *  param)
static
static at_ble_status_t ble_paired_app_event ( void *  param)
static
void button_cb ( void  )
static void timer_callback_handler ( void  )
static

callback handler called on timer expiry

References at_ble_event_user_defined_post().

Referenced by main().

bool app_exec = true

Referenced by main().

user_custom_event_t app_timer_event
Initial value:
=
{
.bptr = NULL
}
#define APP_TIMER_EVENT_ID
Definition: device_info_app.c:183
#define NULL
Definition: nm_bsp.h:64
const ble_gap_event_cb_t device_info_app_gap_cb
static
Initial value:
= {
.disconnected = ble_disconnected_app_event,
.pair_done = ble_paired_app_event,
.encryption_status_changed = ble_encryption_app_event
}
static at_ble_status_t ble_encryption_app_event(void *param)
Definition: device_info_app.c:264
static at_ble_status_t ble_connected_app_event(void *param)
Definition: device_info_app.c:284
static at_ble_status_t ble_disconnected_app_event(void *param)
Definition: device_info_app.c:274
static at_ble_status_t ble_paired_app_event(void *param)
Definition: device_info_app.c:254
const ble_custom_event_cb_t device_info_custom_event_cb
static
Initial value:
= {
.custom_event = dis_custom_event
}
static at_ble_status_t dis_custom_event(void *param)
Definition: device_info_app.c:201
dis_gatt_service_handler_t dis_service_handler