Microchip® Advanced Software Framework

find_me_app.c File Reference

Find Me Profile Application.

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

#include "asf.h"
#include "console_serial.h"
#include "platform.h"
#include "timer_hw.h"
#include "conf_extint.h"
#include "ble_manager.h"
#include "immediate_alert.h"
#include "find_me_app.h"
#include "find_me_target.h"

Macros

#define APP_TIMER_EVENT_ID   (1)
 

Functions

static void app_immediate_alert (uint8_t alert_val)
 Alerting function on immediate alert. More...
 
void button_cb (void)
 
static at_ble_status_t fmp_custom_event (void *param)
 
int main (void)
 Find Me Application main function. More...
 
static void timer_callback_handler (void)
 Timer callback handler. More...
 

Variables

user_custom_event_t app_timer_event
 
static const ble_custom_event_cb_t fmp_custom_event_cb
 
static uint8_t timer_interval = INIT_TIMER_INTERVAL
 Timer interval variable for application task. More...
 

#define APP_TIMER_EVENT_ID   (1)

Referenced by fmp_custom_event().

static void app_immediate_alert ( uint8_t  alert_val)
static

Alerting function on immediate alert.

Parameters
[in]alertlevel of alert level characteristic of immediate alert service

References DBG_LOG, hw_timer_start(), hw_timer_stop(), IAS_HIGH_ALERT, IAS_MID_ALERT, IAS_NO_ALERT, LED_FAST_INTERVAL, LED_MILD_INTERVAL, and timer_interval.

Referenced by main().

void button_cb ( void  )
static at_ble_status_t fmp_custom_event ( void *  param)
static
static void timer_callback_handler ( void  )
static

Timer callback handler.

References at_ble_event_user_defined_post().

user_custom_event_t app_timer_event
Initial value:
=
{
.bptr = NULL
}
#define NULL
Definition: def.h:47
#define APP_TIMER_EVENT_ID
Definition: find_me_app.c:150
const ble_custom_event_cb_t fmp_custom_event_cb
static
Initial value:
= {
.custom_event = fmp_custom_event
}
static at_ble_status_t fmp_custom_event(void *param)
Definition: find_me_app.c:174
uint8_t timer_interval = INIT_TIMER_INTERVAL
static

Timer interval variable for application task.

Referenced by app_immediate_alert(), and fmp_custom_event().