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 |
References ALL_UNUSED, AT_BLE_SUCCESS, and ble_paired_app_event().
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, device_information_advertise(), and hw_timer_stop().
|
static |
|
static |
References AT_BLE_SUCCESS, dis_conn_handle, FIRMWARE_UPDATE_INTERVAL, at_ble_pair_done_t::handle, and hw_timer_start().
Referenced by ble_connected_app_event().
void button_cb | ( | void | ) |
|
static |
References APP_DIS_ADV_TIMEOUT, APP_DIS_FAST_ADV, AT_BLE_ADV_FP_ANY, AT_BLE_ADV_GEN_DISCOVERABLE, at_ble_adv_start(), AT_BLE_ADV_TYPE_UNDIRECTED, AT_BLE_FAILURE, AT_BLE_SUCCESS, ble_advertisement_data_set(), DBG_LOG, NULL, and status.
Referenced by ble_disconnected_app_event(), and main().
|
static |
int main | ( | void | ) |
Information Service Application main function
References app_exec, AT_BLE_SUCCESS, BLE_CUSTOM_EVENT_TYPE, ble_device_init(), ble_event_task(), BLE_GAP_EVENT_TYPE, ble_mgr_events_callback_handler(), board_init(), DBG_LOG, delay_ms, device_information_advertise(), dis_init_service(), dis_primary_service_define(), hw_timer_init(), hw_timer_register_callback(), NULL, REGISTER_CALL_BACK, serial_console_init(), status, system_init(), and timer_callback_handler().
|
static |
callback handler called on timer expiry
References at_ble_event_user_defined_post().
Referenced by main().
user_custom_event_t app_timer_event |
|
static |
|
static |
at_ble_handle_t dis_conn_handle |
Referenced by ble_encryption_app_event(), ble_paired_app_event(), and dis_custom_event().
dis_gatt_service_handler_t dis_service_handler |
uint8_t fw_version[FW_VERSION_SIZE] |
Referenced by dis_custom_event(), get_board_details(), and usr_identify_board_confirm().