EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
hidkbd.c File Reference

Detailed Description

USB Human Interface Devices (HID) class keyboard driver.

Version
5.1.1

License

Copyright 2015 Silicon Labs, Inc. http://www.silabs.com

This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.

Definition in file hidkbd.c.

#include "em_device.h"
#include "em_common.h"
#include "em_usb.h"
#include "hidkbd.h"

Go to the source code of this file.

Macros

#define DEFAULT_IDLE_RATE   500
 

Functions

void HIDKBD_Init (HIDKBD_Init_t *init)
 Initialize HID Keyboard driver. More...
 
void HIDKBD_KeyboardEvent (HIDKBD_KeyReport_t *report)
 Report a keyboard press/release event. More...
 
int HIDKBD_SetupCmd (const USB_Setup_TypeDef *setup)
 Handle USB setup commands. Implements HID class specific commands. This function must be called each time the device receive a setup command. More...
 
void HIDKBD_StateChangeEvent (USBD_State_TypeDef oldState, USBD_State_TypeDef newState)
 Handle USB state change events, this function must be called each time the USB device state is changed. More...
 
const char HIDKBD_ReportDescriptor[69] SL_ATTRIBUTE_ALIGN (4)
 

Macro Definition Documentation

#define DEFAULT_IDLE_RATE   500

Default idle-rate recommended in the USB HID class specification.

Definition at line 59 of file hidkbd.c.

Referenced by HIDKBD_StateChangeEvent().

Function Documentation

const char HIDKBD_ReportDescriptor [ 69 ] SL_ATTRIBUTE_ALIGN ( )

HID report descriptor created with usb.org's "HID Descriptor Tool(DT)" version 2.4. The descriptor defines an input report which matches the HIDKBD_KeyReport_t typedef, and an output report with 3 bits for controlling NumLock, CapsLock and ScrollLock keyboard LED's