Microchip® Advanced Software Framework

hid_keyboard_app.c File Reference

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  )
static at_ble_status_t hid_connect_cb ( void *  params)
static
static at_ble_status_t hid_custom_event ( void *  param)
static

References AT_BLE_SUCCESS, and key_status.

static at_ble_status_t hid_disconnect_cb ( void *  params)
static
static at_ble_status_t hid_notification_confirmed_cb ( void *  params)
static
static void hid_prf_boot_ntf_cb ( hid_boot_ntf_t boot_ntf_info_t)
static
static void hid_prf_control_point_ntf_cb ( hid_control_mode_ntf_t hid_control_point_value_t)
static
static void hid_prf_protocol_mode_ntf_cb ( hid_proto_mode_ntf_t protocol_mode)
static
static void hid_prf_report_ntf_cb ( hid_report_ntf_t report_info)
static

user_custom_event_t app_button_event
Initial value:
=
{
.bptr = NULL
}
#define NULL
Definition: nm_bsp.h:64
#define APP_BUTTON_EVENT_ID
Button event ID.
Definition: pas_app.h:57
bool app_exec = true
volatile bool app_init_done = false
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
const ble_gap_event_cb_t hid_app_gap_handle
static
Initial value:
= {
.connected = hid_connect_cb,
.disconnected = hid_disconnect_cb
}
static at_ble_status_t hid_connect_cb(void *params)
Definition: hid_keyboard_app.c:259
static at_ble_status_t hid_disconnect_cb(void *params)
Definition: hid_keyboard_app.c:271
const ble_gatt_server_event_cb_t hid_app_gatt_server_handle
static
Initial value:
= {
.notification_confirmed = hid_notification_confirmed_cb
}
static at_ble_status_t hid_notification_confirmed_cb(void *params)
Definition: hid_keyboard_app.c:317
uint8_t hid_app_keyb_report_map[]
static

Referenced by hid_keyboard_app_init().

hid_control_mode_ntf_t hid_control_point_value
const ble_custom_event_cb_t hid_custom_event_cb
static
Initial value:
= {
.custom_event = hid_custom_event
}
static at_ble_status_t hid_custom_event(void *param)
Definition: hid_keyboard_app.c:251
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
hid_report_ntf_t report_ntf_info