Implementing USB Keyboard LED Control for BoxLambda Project
By
transpute
Kettled twice. Extra chewy, extra trustworthy.
Summary
The article details the technical implementation of USB HID (Human Interface Device) support for a project called BoxLambda, specifically focusing on adding keyboard LED control functionality. The author initially used an existing USB HID host core but discovered it lacked keyboard LED support, requiring them to implement this feature themselves. The content covers technical aspects including USB protocol details, HID report descriptors, endpoint handling, and the specific implementation challenges of controlling keyboard LEDs through USB HID reports.
Key quotes
· 5 pulledThe original usb_hid_host core does not include support for controlling USB keyboard LEDs. Adding that feature turned out to be more involved than I expected.
USB HID (Human Interface Device) is a USB device class specification for human interface devices such as keyboards, mice, game controllers, and alphanumeric display devices.
The HID report descriptor is a binary data structure that describes the format and meaning of the data that the device sends and receives.
Keyboard LEDs are controlled through a HID Output Report. The host sends this report to the device to turn LEDs on or off.
The biggest challenge was figuring out how to send the LED control report to the keyboard. The usb_hid_host core only supported receiving reports from the device, not sending them to it.
You might also wanna read
MuseLab nanoCH32H417: $17 RISC-V MCU Board with USB 3.0 and Fast Ethernet
MuseLab has released the nanoCH32H417, a third-party development board for the WCH CH32H417 dual-core RISC-V MCU. Priced at $17, the board f
cnx-software.com·4d agoAngstromIO: Ultra-Compact Attiny1616 Devboard and CH32V003 Experimentation Platform
The article describes three hardware development boards created by the author: 1) AngstromIO, an extremely compact development board based o
f32: Ultra-Compact ESP32 Development Board for USB-C Mounting
The f32 is an ultra-compact ESP32 development board designed to mount directly behind a USB-C receptacle, measuring just 9.85 mm x 8.45 mm.
SWD Debug Probe for RP2350 RISC-V Cores Using Raspberry Pi Pico 2
This article describes a SWD (Serial Wire Debug) debug probe implementation for RP2350 RISC-V (Hazard3) cores using Raspberry Pi Pico 2 hard
wolfCOSE: A Lightweight COSE + CBOR Library for Embedded Systems with PQC and FIPS 140-3 Support
wolfCOSE is a lightweight C library implementing CBOR (RFC 8949) and COSE (RFC 9052/9053) for embedded systems, using wolfSSL as the crypto
Running Rust and Slint on a Jailbroken Kindle Paperwhite
A developer jailbreaks their 7th generation Kindle Paperwhite to use it as a nightstand clock, then explores running Rust (and Slint) on the
