USB Device Human Interface Device (HID) keyboard interface.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "conf_usb.h"
#include "usb_protocol.h"
#include "udd.h"
#include "udc.h"
#include "udi_hid.h"
#include "udi_hid_kbd.h"
#include <string.h>
Functions | |
void | udi_hid_kbd_disable (void) |
bool | udi_hid_kbd_down (uint8_t key_id) |
Send events key pressed. More... | |
bool | udi_hid_kbd_enable (void) |
uint8_t | udi_hid_kbd_getsetting (void) |
bool | udi_hid_kbd_modifier_down (uint8_t modifier_id) |
Send events key modifier pressed. More... | |
bool | udi_hid_kbd_modifier_up (uint8_t modifier_id) |
Send events key modifier released. More... | |
bool | udi_hid_kbd_setup (void) |
bool | udi_hid_kbd_up (uint8_t key_id) |
Send events key released. More... | |
bool | udi_hid_mkbd_modifier_down (uint16_t modifier_id) |
Send events media key modifier pressed. More... | |
bool | udi_hid_mkbd_modifier_up (uint16_t modifier_id) |
Send events media key modifier released. More... | |
Internal routines | |
static bool | udi_hid_kbd_setreport (void) |
Changes keyboard report states (like LEDs) More... | |
static bool | udi_hid_kbd_send_report (void) |
Send the report. More... | |
static void | udi_hid_kbd_report_sent (udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep) |
Callback called when the report is sent. More... | |
static void | udi_hid_kbd_setreport_valid (void) |
Callback called to update report from USB host udi_hid_kbd_report_set is updated before callback execution. More... | |
Variables | |
UDC_DESC_STORAGE udi_api_t | udi_api_hid_kbd |
UDC_DESC_STORAGE udi_hid_kbd_report_desc_t | udi_hid_kbd_report_desc |
Internal defines and variables to manage HID keyboard | |
#define | UDI_HID_KBD_REPORT_SIZE 9 |
#define | UDI_HID_MKBD_REPORT_SIZE 3 |
static uint8_t | udi_hid_kbd_rate |
static uint8_t | udi_hid_kbd_protocol |
static uint8_t | udi_hid_kbd_report_set |
static bool | udi_hid_kbd_b_report_valid |
static uint8_t | udi_hid_kbd_report [UDI_HID_KBD_REPORT_SIZE] |
static uint8_t | report_size |
static bool | udi_hid_kbd_b_report_trans_ongoing |
static COMPILER_WORD_ALIGNED uint8_t | udi_hid_kbd_report_trans [UDI_HID_KBD_REPORT_SIZE] |