Scan parameters Service - Application.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "console_serial.h"
#include "at_ble_api.h"
#include "platform.h"
#include "timer_hw.h"
#include "ble_utils.h"
#include "conf_extint.h"
#include "scan_param.h"
#include "ble_manager.h"
#include "scan_parameter_app.h"
Macros | |
#define | APP_TIMER_EVENT_ID (1) |
#define | SCAN_PRAM_UPDATE_INTERVAL (3) |
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) |
int | main (void) |
Parameter Application main function More... | |
static at_ble_status_t | sps_char_changed_cb (void *param) |
Characteristic change handler function More... | |
static at_ble_status_t | sps_custom_event (void *param) |
static at_ble_status_t | sps_notification_confirmed_cb (void *param) |
static at_ble_status_t | sps_service_advertise (void) |
void | timer_callback_handler (void) |
callback handler called on timer expiry More... | |
Variables | |
volatile bool | app_init_done = false |
user_custom_event_t | app_timer_event |
static const ble_gap_event_cb_t | ble_scan_param_app_gap_cb |
static const ble_gatt_server_event_cb_t | ble_scan_param_app_gatt_server_cb |
bool volatile | notification_cfm_flag = true |
uint16_t | scan_interval_window [2] |
uint8_t | scan_refresh |
uint8_t | scan_refresh_value = 0 |
static const ble_custom_event_cb_t | sps_custom_event_cb |
sps_gatt_service_handler_t | sps_service_handler |
#define APP_TIMER_EVENT_ID (1) |
Referenced by sps_custom_event().
#define SCAN_PRAM_UPDATE_INTERVAL (3) |
Referenced by ble_encryption_app_event(), and ble_paired_app_event().
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, ble_paired_app_event(), and at_ble_connected_t::conn_status.
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, hw_timer_stop(), and sps_service_advertise().
|
static |
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, hw_timer_start(), SCAN_PRAM_UPDATE_INTERVAL, and at_ble_pair_done_t::status.
Referenced by ble_connected_app_event().
void button_cb | ( | void | ) |
int main | ( | void | ) |
Parameter Application main function
References app_init_done, BLE_CUSTOM_EVENT_TYPE, ble_device_init(), ble_event_task(), BLE_GAP_EVENT_TYPE, BLE_GATT_SERVER_EVENT_TYPE, ble_mgr_events_callback_handler(), board_init(), DBG_LOG, hw_timer_init(), hw_timer_register_callback(), NULL, REGISTER_CALL_BACK, scan_interval_window, scan_refresh, serial_console_init(), sps_init_service(), sps_primary_service_define(), sps_service_advertise(), system_init(), and timer_callback_handler().
|
static |
Characteristic change handler function
References sps_char_changed_event().
|
static |
|
static |
References AT_BLE_SUCCESS, DBG_LOG_DEV, notification_cfm_flag, and at_ble_cmd_complete_event_t::status.
|
static |
References APP_SCP_ADV_TIMEOUT, APP_SCP_FAST_ADV, AT_BLE_ADV_FP_ANY, AT_BLE_ADV_GEN_DISCOVERABLE, at_ble_adv_start(), AT_BLE_ADV_TYPE_UNDIRECTED, AT_BLE_SUCCESS, ble_advertisement_data_set(), DBG_LOG, and NULL.
Referenced by ble_disconnected_app_event(), and main().
void timer_callback_handler | ( | void | ) |
callback handler called on timer expiry
Timer Callback.
Timer call back handler called on timer expiry.
References app_init_done, at_ble_event_user_defined_post(), and hw_timer_stop().
user_custom_event_t app_timer_event |
|
static |
|
static |
Referenced by sps_custom_event(), and sps_notification_confirmed_cb().
uint16_t scan_interval_window[2] |
Referenced by main(), and sps_char_changed_event().
uint8_t scan_refresh |
Referenced by main(), and sps_init_service().
uint8_t scan_refresh_value = 0 |
Referenced by sps_custom_event(), and sps_scan_refresh_char_update().
|
static |
sps_gatt_service_handler_t sps_service_handler |