Microchip® Advanced Software Framework

multilink_central_app.c File Reference

Multilink central application.

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

#include "platform_files.h"
#include "bm_mode.h"
#include "bm_application_mode.h"
#include "bm_utils.h"
#include "event_mem.h"
#include "ble_api.h"
#include "platform.h"
#include "ble_manager.h"
#include "multilink_central_app.h"

Functions

static ble_status_t app_adv_param_set (const uint8_t *ad_data, uint8_t ad_data_length, const uint8_t *scan_data, uint8_t scan_data_len)
 
static ble_status_t app_adv_report_cb (event_msg_t *msg)
 
static ble_status_t app_char_descriptor_disc_resp_cb (event_msg_t *msg)
 
static ble_status_t app_char_disc_resp_cb (event_msg_t *msg)
 
static ble_status_t app_char_value_received_cb (event_msg_t *msg)
 
static ble_status_t app_char_value_write_cb (event_msg_t *msg)
 
static ble_status_t app_cmd_complete_cb (event_msg_t *msg)
 
static ble_status_t app_config_mode_status_cb (event_msg_t *msg)
 
static ble_status_t app_conn_param_update_cb (event_msg_t *msg)
 
static ble_status_t app_connected_cb (event_msg_t *msg)
 
static ble_status_t app_disconnected_cb (event_msg_t *msg)
 
static void app_init (void)
 
static ble_status_t app_le_end_test_result_cb (event_msg_t *msg)
 
static ble_status_t app_pairing_complete_cb (event_msg_t *msg)
 
static ble_status_t app_passkey_confirm_req_cb (event_msg_t *msg)
 
static ble_status_t app_passkey_entry_req_cb (event_msg_t *msg)
 
static ble_status_t app_service_disc_resp_cb (event_msg_t *msg)
 
static ble_status_t app_status_report_cb (event_msg_t *msg)
 
static ble_status_t app_trans_data_received_cb (event_msg_t *msg)
 
void button_cb (void)
 
int main (void)
 
static void timer_callback_fn (void)
 

Variables

bool acce_notify_enabled = false
 
static const uint8_t adv_data []
 
static const ble_common_event_cb_t app_common_event_handle
 
static const ble_gap_event_cb_t app_gap_event_handle
 
static const
ble_gatt_client_event_cb_t 
app_gatt_client_event_handle
 
static const
ble_gatt_server_event_cb_t 
app_gatt_server_event_handle
 
bool app_notify_timer_expired = false
 
static const ble_pairing_event_cb_t app_pairing_event_handle
 
static const
ble_gatt_transparent_event_cb_t 
app_transparent_event_handle
 
uint8_t event_buf [EVENT_BUFFER_LENGTH]
 
event_t evt_param = {.event_msg.data = event_buf, .event_msg.data_len = 0, .event_id = 0}
 
uint8_t found_cccd_index = 0
 
bool gyro_notify_enabled = false
 
uint8_t remote_central_device_count = 0
 
app_ble_remote_device_info_t remote_device_info [MAX_REMOTE_DEVICE] = {0}
 
uint8_t remote_peripheral_device_count = 0
 
static const uint8_t scan_resp_data [] = {0x0C, 0x09, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x2D, 0x44, 0x65, 0x6D, 0x6F}
 
bool service_disc_pending = 0
 
acc_sensor_value_t sonsor_data = {0}
 

static ble_status_t app_adv_param_set ( const uint8_t *  ad_data,
uint8_t  ad_data_length,
const uint8_t *  scan_data,
uint8_t  scan_data_len 
)
static
static ble_status_t app_char_descriptor_disc_resp_cb ( event_msg_t msg)
static
static ble_status_t app_char_value_write_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_cmd_complete_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_config_mode_status_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_conn_param_update_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_le_end_test_result_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_pairing_complete_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_passkey_confirm_req_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_passkey_entry_req_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_service_disc_resp_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_status_report_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

static ble_status_t app_trans_data_received_cb ( event_msg_t msg)
static

References BLE_SUCCESS.

void button_cb ( void  )
static void timer_callback_fn ( void  )
static

References app_notify_timer_expired.

Referenced by main().

bool acce_notify_enabled = false
const uint8_t adv_data[]
static
Initial value:
= { 0x02,ADV_FLAGS,0x05,
0x15, ADV_MANUFATURER_SPECIFIC_DATA, 0xCD, 0x00, 0xFE, 0x14, 0xAD, 0x11, 0xCF, 0x40, 0x06, 0x3F, 0x11, 0xE5, 0xBE, 0x3E, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x2C,
}
Definition: ble_host_sdk/ble_services/ble_mgr/ble_manager.h:121
Definition: ble_host_sdk/ble_services/ble_mgr/ble_manager.h:112
const ble_common_event_cb_t app_common_event_handle
static
Initial value:
= {
.cmd_complete = app_cmd_complete_cb,
.status_report = app_status_report_cb,
.le_end_test_result = app_le_end_test_result_cb,
.config_mode_status = app_config_mode_status_cb,
}
const ble_gap_event_cb_t app_gap_event_handle
static
Initial value:
= {
.adv_report = app_adv_report_cb,
.connected = app_connected_cb,
.disconnected = app_disconnected_cb,
.conn_param_update = app_conn_param_update_cb,
}
const ble_gatt_client_event_cb_t app_gatt_client_event_handle
static
Initial value:
= {
.service_disc_resp = app_service_disc_resp_cb,
.char_disc_resp = app_char_disc_resp_cb,
.char_descriptor_disc_resp = app_char_descriptor_disc_resp_cb,
.char_value_received = app_char_value_received_cb,
}
const ble_gatt_server_event_cb_t app_gatt_server_event_handle
static
Initial value:
= {
.char_value_write = app_char_value_write_cb,
}
bool app_notify_timer_expired = false
const ble_pairing_event_cb_t app_pairing_event_handle
static
Initial value:
= {
.passkey_entry_req = app_passkey_entry_req_cb,
.pairing_complete = app_pairing_complete_cb,
.passkey_confirm_req = app_passkey_confirm_req_cb,
}
const ble_gatt_transparent_event_cb_t app_transparent_event_handle
static
Initial value:
= {
.trans_data_received = app_trans_data_received_cb,
}
uint8_t event_buf[EVENT_BUFFER_LENGTH]
event_t evt_param = {.event_msg.data = event_buf, .event_msg.data_len = 0, .event_id = 0}
uint8_t found_cccd_index = 0
bool gyro_notify_enabled = false
uint8_t remote_central_device_count = 0
uint8_t remote_peripheral_device_count = 0
const uint8_t scan_resp_data[] = {0x0C, 0x09, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x2D, 0x44, 0x65, 0x6D, 0x6F}
static

Referenced by main().

bool service_disc_pending = 0
acc_sensor_value_t sonsor_data = {0}