Repository navigation
v0.2.0
The wire protocol, the C ABI and the firmware build interface change; a 0.1.0 board and a 0.2.0
library do not talk to each other (MIMHID_ERR_PROTOCOL), and the reverse. Not
hardware-verified: the changes are tested with the firmware core's own tests, with the simulated
board over a pseudo-terminal, and by building every port (RP2040, RP2350, nRF52840, STM32F4;
the ESP32-S3 build is left to CI); none of it has run on a board yet.
- Nothing about the chip is assumed by the firmware build. Each port states the interfaces
(MIMHID_HID_ITFS), the highest endpoint number (MIMHID_MAX_ENDPOINT_NUMBER), the endpoint
packet size (MIMHID_MAX_ENDPOINT_BYTES),CFG_TUSB_OS,CFG_TUSB_RHPORT0_MODEand
CFG_TUD_MAX_SPEEDon the command line; a missing one is a compile error that names it. The
nRF52840 no longer gets 7 by default,core.hno longer picks 15 for the RP chips from
PICO_RP2040, andtusb_config.hno longer defaults to full speed and no OS. The Pico build
needsPICO_PLATFORM,PICO_BOARD,MIMHID_UART_ID,MIMHID_UART_TX_PINand
MIMHID_UART_RX_PIN; the ESP32-S3 build both pins; the nRF52840 and STM32F4 builds-DBOARD
(the STM32F4 port records the endpoint count of each board's MCU and refuses an unlisted board,
and gives the F412 boards 5 interfaces, not 3). - A number the controller does not have is refused. Until now an endpoint address such as
0x8Fwas accepted by the host and the board, TinyUSB then failed the target's
SET_CONFIGURATION, and the commit ended inMIMHID_ERR_TIMEOUT(on the nRF52840 the endpoint
number 8 was opened as a corrupt isochronous endpoint without an error). The PONG now carries
max_endpoint_number(byte 34; the unique id moved to 35 and 36..;MIMHID_PONG_MIN_LEN36),
mimhid_device_info.reserved8becamemax_endpoint_number,mimhid_board_limitsgained
max_endpoint_number(its size is 36), andmimhid_node_openreturnsMIMHID_ERR_OVERFLOW
for a larger number. The firmware refuses it withNAK_OVERFLOW. - The firmware fills nothing in. A zero LANGID,
bcdUSB,bcdHID, IN endpoint address, size
or interval, anbmAttributeswithout bit 7, and an OUT endpoint that is only partly given are
refused (NAK_PARAM); a COMMIT whose nodes of one interface differ, or that uses an endpoint
number twice in one direction, is refused (NAK_DESCRIPTOR). The host library already
required all of these, so a program that works with the library is not affected. - The initializers fill nothing in. Every
mimhid_*_initfunction (and itsmimhid::twin)
zeroes the structure and setsstruct_size, and nothing else: the pid.codes test IDs, the
strings, the boot rate, the handshake and commit timeouts, the report size, the Linux HID limits,
bm_attributes, the node's class,bcdHID, endpoint and interval, and every profile's fields
(the mouse buttons and ranges, the keyboard Usages, the gamepad axes, the touch and pen
fields) are the program's to set, and a required one left at zero is refused with
MIMHID_ERR_UNSET_FIELD.mimhid_node_config_initandmimhid::node_config()lost their
interface_numberargument (setiface.numberandep_in.addressyourself), and the four
constantsMIMHID_CONTROL_TIMEOUT_MS,MIMHID_SEND_TIMEOUT_MS,MIMHID_DRAIN_TIMEOUT_MSand
MIMHID_RECONNECT_TIMEOUT_MSare gone. The README,docs/API.md(which lists what each
structure requires) and the examples show every value set. - A vendor ID of zero is refused.
usb_device.vendor_idjoinedbcd_usb,language_idand
ep0_max_packet_sizeas a field the library will not guess, so a program that forgot it no
longer presents0000:xxxx(or, until now, the pid.codes test IDs the initializer used to put
in). A product ID of zero is still a valid one. - nRF52840: the D+ pull-up is taken down again after every USB power event until a
configuration is committed, so a board that has not been committed no longer enumerates as
CAFE:4000with no interface when the cable is plugged in.
Firmware Binary Third-Party Notices
The host library (libmimhid) is licensed under the MIT License and has no third-party runtime library dependencies.
Prebuilt microcontroller firmware images (mimhid_firmware-*) incorporate third-party SDK and USB stack components under permissive licenses:
| Firmware asset | Third-party components & licenses |
|---|---|
mimhid_firmware-rp2040-*, mimhid_firmware-rp2350-* |
TinyUSB 0.18.0 (MIT), Raspberry Pi Pico SDK 2.2.0 (BSD-3-Clause, Copyright (c) 2020 Raspberry Pi (Trading) Ltd.), Arm CMSIS Core (Apache-2.0), Newlib C runtime |
mimhid_firmware-nrf52840-* |
TinyUSB 0.18.0 (MIT), Nordic Semiconductor nrfx (BSD-3-Clause, Copyright (c) 2017-2024 Nordic Semiconductor ASA), Arm CMSIS 5 (Apache-2.0), Newlib C runtime |
mimhid_firmware-stm32f4-* |
TinyUSB 0.18.0 (MIT), STMicroelectronics cmsis_device_f4 & stm32f4xx_hal_driver (BSD-3-Clause / Apache-2.0, Copyright (c) 2016-2019 STMicroelectronics), Arm CMSIS 5 (Apache-2.0), Newlib C runtime |
mimhid_firmware-esp32s3-* |
TinyUSB 0.18.0 (MIT), Espressif ESP-IDF v5.4.2 (Apache-2.0, Copyright 2015-2025 Espressif Systems), Amazon FreeRTOS Kernel (MIT), Newlib C runtime |
Complete copyright notices, license texts, and warranty disclaimers for all firmware binaries are provided in the release asset mimhid_firmware-THIRD_PARTY_NOTICES-0.2.0.txt and in THIRD_PARTY_NOTICES.md / NOTICE.