Repository navigation
v0.7.1
The API has one shape for every kind of function: a factory makes a Spec, mimusb_node_open opens any
Spec at a placement, and control rules are the one way a class talks on endpoint 0, for HID and for
any class that comes after it. The wire protocol and the firmware are unchanged apart from the version
they report (a board must run firmware of the same minor version, 0.7).
Added
mimusb_spec_create_cdc_acmandmimusb_cdc_acm_options: a CDC-ACM function as a Spec. The library
writes the two interfaces, the class descriptors, the Interface Association descriptor and the
three rules (SET_LINE_CODING,GET_LINE_CODING,SET_CONTROL_LINE_STATE); the data is the
program's. RolesMIMUSB_ROLE_CDC_NOTIFY,_CDC_DATA_IN,_CDC_DATA_OUT; kind
MIMUSB_PROFILE_CDC_ACM.src/classes/cdc_acm.cppis where a class without a state lives: it only
makes interfaces and rules at the placement and opens them as any interfaces are.mimusb_node_placement.extra_rulesandextra_rule_count: control rules of the caller's own for a
Node of any Spec (a HID profile too), tried before the rules the Spec brings. A request is answered by
the first rule that matches, so a rule of the caller's can take over one the library would answer.mimusb_node_find_ruleandmimusb_rule_slot(MIMUSB_RULE_SLOT_CDC_LINE_CODING): a rule a Spec
names is found by name, not by its place among the Node's rules.mimusb_spec_interface_countandmimusb_spec_rule_cost: how many interface numbers a Spec takes
and what it adds to the board's rule memory.mimusb_target_limits(mimusb_device_config.target): what the target machine limits, whatever the
function. Its one member islinux_hid.docs/API.md: Kinds of Spec, one table of every factory with its interfaces, roles, rules and
state.
Changed
mimusb_spec_create_rawismimusb_spec_create_hid, andmimusb_raw_options,mimusb_raw_report,
mimusb_raw_options_init,mimusb_raw_submitandMIMUSB_PROFILE_RAWare
mimusb_hid_options,mimusb_hid_report,mimusb_hid_options_init,mimusb_hid_submitand
MIMUSB_PROFILE_HID: it was always a HID Spec, with a report descriptor of the caller's own. The
fields of its errors begin withhid.instead ofraw.. "Raw" now means only a Device given as
bytes (mimusb_device_set_descriptors).MIMUSB_HID_ROLE_INand_OUTareMIMUSB_ROLE_HID_INand_HID_OUT: a role is named for the kind
of Spec that has it.mimusb_transport_options.linux_hidismimusb_device_config.target.linux_hid, and it is required
when a Node of a HID Spec is opened (MIMUSB_ERR_UNSET_FIELDotherwise), not when the Device is
opened: a Device that opens only CDC-ACM or interfaces Nodes leaves it 0.mimusb_node_placementis 56 bytes (was 40) andmimusb_device_confighastargetafter
transport; the layout golden file and the generated bindings follow. The control rules of every
Node, not only those of amimusb_spec_create_interfacesSpec, come first in the table the board
holds, before those the library writes for the HID profiles and those of the Device.mimusb_node_set_rule_datanumbers a Node's rules as itsextra_rulesfirst, then the rules its
Spec brings.- Inside the library, HID is a class like any other: every class is a
FunctionClass
(src/classes/function_class.hpp) that builds a Node's interfaces and rules at its placement, lays
out its Nodes at each commit and hears the requests its rules take. The device layer (src/api)
knows no class; HID's report state is the runtime of a HID Node (HidNode), and the HID code lives
insrc/classes/hid/, one file per profile for the Spec factories (spec_*.cpp) and the state
machines (state_*.cpp). The rules a class answers live (HID'sGET_IDLE,GET_PROTOCOL) are
marked as such instead of being known by their kind. No change to the API, the ABI or the wire.
Removed
mimusb_hid_descriptor_bytesandmimusb_hid_descriptor_rule: a HID interface of the caller's own is
amimusb_spec_create_hidSpec; for one whose descriptor must not be checked the 9 bytes and the rule
are written out in amimusb_spec_create_interfacesSpec (examples/c/hid_interface.c).mimusb_cdc_acm_descriptors,mimusb_cdc_acm_descriptors_makeandmimusb_cdc_acm_rules:
replaced bymimusb_spec_create_cdc_acm.
Firmware Binary Third-Party Notices
The host library (libmimusb) is licensed under the MIT License and has no third-party runtime library dependencies.
Prebuilt microcontroller firmware images (mimusb_firmware-*) incorporate third-party SDK and USB stack components under permissive licenses:
| Firmware asset | Third-party components & licenses |
|---|---|
mimusb_firmware-rp2040-*, mimusb_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 |
mimusb_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 |
mimusb_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 |
mimusb_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 mimusb_firmware-THIRD_PARTY_NOTICES-0.7.1.txt and in THIRD_PARTY_NOTICES.md / NOTICE.