Microchip® Advanced Software Framework

ble_observer.c File Reference

BLE Observer application.

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

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

Macros

#define APP_BUTTON_EVENT_ID   (1)
 Button event ID. More...
 

Functions

static at_ble_status_t ble_observer_custom_event (void *param)
 
at_ble_status_t ble_observer_scan_data_handler (void *param)
 Handler for AT_BLE_SCAN_REPORT event from stack. More...
 
at_ble_status_t ble_observer_scan_info_handler (void *param)
 Handler for scan info event. More...
 
void button_cb (void)
 
int main (void)
 

Variables

user_custom_event_t app_button_event
 
volatile bool app_init_done = false
 
static const ble_custom_event_cb_t ble_observer_custom_event_cb
 
volatile bool button_press = false
 
static const ble_gap_event_cb_t observer_app_gap_cb
 
uint8_t scan_device_count
 
uint32_t scan_response_count
 
volatile uint8_t scanning_state = false
 

#define APP_BUTTON_EVENT_ID   (1)

Button event ID.

Referenced by ble_observer_custom_event().

at_ble_status_t ble_observer_scan_data_handler ( void *  param)

Handler for AT_BLE_SCAN_REPORT event from stack.

Parameters
[in]scan_info_datascan information data
[in]scan_resp_countnumber of scanned devices
Returns
Status at_ble_status_t

References ALL_UNUSED, AT_BLE_SUCCESS, DBG_LOG, and scan_device_count.

void button_cb ( void  )

user_custom_event_t app_button_event
Initial value:
=
{
.bptr = NULL
}
#define APP_BUTTON_EVENT_ID
Button event ID.
Definition: ble_observer.c:150
#define NULL
Definition: nm_bsp.h:64
volatile bool app_init_done = false
const ble_custom_event_cb_t ble_observer_custom_event_cb
static
Initial value:
= {
.custom_event = ble_observer_custom_event
}
static at_ble_status_t ble_observer_custom_event(void *param)
Definition: ble_observer.c:178
volatile bool button_press = false
const ble_gap_event_cb_t observer_app_gap_cb
static
Initial value:
= {
}
at_ble_status_t ble_observer_scan_data_handler(void *param)
Handler for AT_BLE_SCAN_REPORT event from stack.
Definition: ble_observer.c:634
at_ble_status_t ble_observer_scan_info_handler(void *param)
Handler for scan info event.
Definition: ble_observer.c:242
uint8_t scan_device_count
uint32_t scan_response_count
volatile uint8_t scanning_state = false