hidkbd.c File Reference

USB Human Interface Devices (HID) class keyboard driver.

License

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

SPDX-License-Identifier: Zlib

The licensor of this software is Silicon Laboratories Inc.

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Definition in file hidkbd.c.

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

Macros

#define DEFAULT_IDLE_RATE   500
 

Functions

void HIDKBD_Init (HIDKBD_Init_t *init)
 Initialize HID Keyboard driver.
 
void HIDKBD_KeyboardEvent (HIDKBD_KeyReport_t *report)
 Report a keyboard press/release event.
 
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.
 
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.
 
const char HIDKBD_ReportDescriptor[69] SL_ATTRIBUTE_ALIGN (4)