HID Mouse Device Profile Application declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include "platform.h"
#include "at_ble_api.h"
#include "console_serial.h"
#include "ble_manager.h"
#include "hid.h"
#include "hid_mouse_app.h"
#include "device_info.h"
#include "ble_utils.h"
#include "conf_extint.h"
Functions | |
void | button_cb (void) |
static at_ble_status_t | hid_connect_cb (void *params) |
static at_ble_status_t | hid_custom_event (void *param) |
static at_ble_status_t | hid_disconnect_cb (void *params) |
static void | hid_mouse_app_init (void) |
static bool | hid_mouse_move (int8_t pos, uint8_t index_report) |
static at_ble_status_t | hid_notification_confirmed_cb (void *params) |
static void | hid_prf_boot_ntf_cb (hid_boot_ntf_t *boot_ntf_info_t) |
static void | hid_prf_control_point_ntf_cb (hid_control_mode_ntf_t *hid_control_point_value_t) |
static void | hid_prf_protocol_mode_ntf_cb (hid_proto_mode_ntf_t *protocol_mode) |
static void | hid_prf_report_ntf_cb (hid_report_ntf_t *report_info) |
int | main (void) |
Variables | |
user_custom_event_t | app_button_event |
bool | app_exec = true |
To keep the app executing continuously. More... | |
volatile bool | app_init_done = false |
int8_t | app_mouse_report [4] = {0x00, 0x00, 0x00, 0x00} |
hid_boot_ntf_t | boot_ntf_info |
uint8_t | cnt = 0 |
uint8_t | conn_status = 0 |
static const ble_gap_event_cb_t | hid_app_gap_handle |
static const ble_gatt_server_event_cb_t | hid_app_gatt_server_handle |
static uint8_t | hid_app_mouse_report_map [] |
hid_control_mode_ntf_t | hid_control_point_value |
static const ble_custom_event_cb_t | hid_custom_event_cb |
hid_prf_info_t | hid_prf_data |
hid_proto_mode_ntf_t | hid_proto_mode_value |
uint8_t | mouse_pos = MOUSE_RIGHT_MOVEMENT |
uint8_t | mouse_status = 0 |
hid_report_ntf_t | report_ntf_info |
void button_cb | ( | void | ) |
References app_init_done, at_ble_event_user_defined_post(), and mouse_status.
|
static |
References ALL_UNUSED, app_mouse_report, AT_BLE_SUCCESS, cnt, conn_status, mouse_pos, MOUSE_RIGHT_MOVEMENT, and mouse_status.
|
static |
References AT_BLE_SUCCESS, mouse_status, and status.
|
static |
References ALL_UNUSED, app_mouse_report, AT_BLE_SUCCESS, cnt, conn_status, mouse_pos, MOUSE_RIGHT_MOVEMENT, and mouse_status.
|
static |
References app_mouse_report, hid_info::bcd_hid, hid_info::bcountry_code, DBG_LOG, DBG_LOG_PTS, hid_info::flags, hid_app_mouse_report_map, hid_prf_info_t::hid_device, hid_prf_info_t::hid_device_info, HID_MOUSE_MODE, HID_NUM_OF_REPORT, hid_prf_conf(), HID_PRF_SUCESS, HID_REPORT_PROTOCOL_MODE, hid_prf_info_t::hid_serv_instance, i, INPUT_REPORT, hid_prf_info_t::num_of_report, hid_prf_info_t::protocol_mode, hid_prf_info_t::report_id, hid_prf_info_t::report_len, hid_report_map::report_map, hid_prf_info_t::report_map_info, hid_report_map::report_map_len, hid_prf_info_t::report_type, and hid_prf_info_t::report_val.
Referenced by main().
|
static |
References app_mouse_report.
Referenced by main().
|
static |
References AT_BLE_SUCCESS, DBG_LOG_DEV, and at_ble_cmd_complete_event_t::status.
|
static |
References hid_boot_ntf::boot_value, DBG_LOG_DEV, hid_boot_ntf::ntf_conf, and hid_boot_ntf::serv_inst.
Referenced by main().
|
static |
References hid_control_mode_ntf::control_value, DBG_LOG_DEV, and hid_control_mode_ntf::serv_inst.
Referenced by main().
|
static |
References hid_proto_mode_ntf::conn_handle, DBG_LOG_DEV, hid_proto_mode_ntf::mode, and hid_proto_mode_ntf::serv_inst.
Referenced by main().
|
static |
References hid_report_ntf::conn_handle, DBG_LOG_DEV, hid_report_ntf::ntf_conf, hid_report_ntf::report_ID, and hid_report_ntf::serv_inst.
Referenced by main().
int main | ( | void | ) |
References app_exec, app_init_done, app_mouse_report, 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(), cnt, hid_report_ntf::conn_handle, conn_status, DBG_LOG, delay_ms, hid_mouse_app_init(), hid_mouse_move(), hid_prf_boot_ntf_cb(), hid_prf_control_point_ntf_cb(), hid_prf_init(), hid_prf_protocol_mode_ntf_cb(), hid_prf_report_ntf_cb(), hid_prf_report_update(), KEY_PAD_DEBOUNCE_TIME, MOUSE_CHANGE_DIRECTION, MOUSE_DOWN_MOVEMENT, MOUSE_LEFT_MOVEMENT, MOUSE_MOVEMENT_POS, mouse_pos, MOUSE_RIGHT_MOVEMENT, mouse_status, MOUSE_UP_MOVEMENT, notify_boot_ntf_handler(), notify_control_point_handler(), notify_protocol_mode_handler(), notify_report_ntf_handler(), NULL, REGISTER_CALL_BACK, serial_console_init(), hid_report_ntf::serv_inst, and system_init().
user_custom_event_t app_button_event |
int8_t app_mouse_report[4] = {0x00, 0x00, 0x00, 0x00} |
Referenced by hid_connect_cb(), hid_disconnect_cb(), hid_mouse_app_init(), hid_mouse_move(), and main().
hid_boot_ntf_t boot_ntf_info |
uint8_t cnt = 0 |
uint8_t conn_status = 0 |
|
static |
|
static |
|
static |
Referenced by hid_mouse_app_init().
hid_control_mode_ntf_t hid_control_point_value |
|
static |
hid_prf_info_t hid_prf_data |
hid_proto_mode_ntf_t hid_proto_mode_value |
uint8_t mouse_pos = MOUSE_RIGHT_MOVEMENT |
Referenced by hid_connect_cb(), hid_disconnect_cb(), and main().
uint8_t mouse_status = 0 |
Referenced by button_cb(), hid_connect_cb(), hid_custom_event(), hid_disconnect_cb(), and main().
hid_report_ntf_t report_ntf_info |