HID Keyboard 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_keyboard_app.h"
#include "device_info.h"
#include "ble_utils.h"
#include "timer_hw.h"
#include "conf_extint.h"
#include "hid_device.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_keyboard_app_init (void) |
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 |
volatile bool | app_init_done = false |
uint8_t | app_keyb_report [8] = {0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00} |
hid_boot_ntf_t | boot_ntf_info |
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_keyb_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 |
volatile uint8_t | key_status = 0 |
uint8_t | keyb_disp [12] = {0x0B, 0x08, 0x0F, 0x0F, 0x12, 0x2C, 0x04, 0x17, 0x10, 0x08, 0x0F, 0x28} |
uint8_t | keyb_id = 0 |
hid_report_ntf_t | report_ntf_info |
void button_cb | ( | void | ) |
References app_init_done, at_ble_event_user_defined_post(), and key_status.
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, conn_status, and keyb_id.
|
static |
References AT_BLE_SUCCESS, key_status, and status.
|
static |
References ALL_UNUSED, AT_BLE_SUCCESS, conn_status, and keyb_id.
|
static |
References app_keyb_report, hid_info::bcd_hid, hid_info::bcountry_code, DBG_LOG, DBG_LOG_PTS, hid_info::flags, hid_app_keyb_report_map, hid_prf_info_t::hid_device, hid_prf_info_t::hid_device_info, HID_KEYBOARD_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 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_keyb_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(), CAPS_OFF, CAPS_ON, hid_report_ntf::conn_handle, conn_status, DBG_LOG, delay_ms, hid_keyboard_app_init(), 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, key_status, keyb_disp, keyb_id, MAX_TEXT_LEN, notify_boot_ntf_handler(), notify_control_point_handler(), notify_protocol_mode_handler(), notify_report_ntf_handler(), NULL, POSITION_SIX, POSITION_ZERO, REGISTER_CALL_BACK, serial_console_init(), hid_report_ntf::serv_inst, and system_init().
user_custom_event_t app_button_event |
Referenced by button_cb(), main(), and timer_callback_handler().
uint8_t app_keyb_report[8] = {0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00} |
Referenced by hid_keyboard_app_init(), and main().
hid_boot_ntf_t boot_ntf_info |
uint8_t conn_status = 0 |
Referenced by hid_connect_cb(), hid_disconnect_cb(), and main().
|
static |
|
static |
|
static |
Referenced by hid_keyboard_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 |
volatile uint8_t key_status = 0 |
Referenced by button_cb(), hid_custom_event(), and main().
uint8_t keyb_disp[12] = {0x0B, 0x08, 0x0F, 0x0F, 0x12, 0x2C, 0x04, 0x17, 0x10, 0x08, 0x0F, 0x28} |
Referenced by main().
uint8_t keyb_id = 0 |
Referenced by hid_connect_cb(), hid_disconnect_cb(), and main().
hid_report_ntf_t report_ntf_info |