The release of TinyUSB project 0.19 is available, developing a cross-platform USB stack for embedded systems. Components of the USB stack are provided for USB hosts and for connected devices. The project code is written in C and is distributed under the MIT license.
To enhance security, TinyUSB does not use dynamic memory allocation. It supports use in multithreaded applications. For safe multithreaded operation, all events related to interrupt occurrences are not processed immediately upon receiving an ISR (Interrupt Service Request), but are queued and processed in the context of application execution, rather than in the interrupt handler. Semaphores and mutexes are employed when accessing shared resources, such as the FIFO CDC (Communication Device Class).
The stack is abstracted from the operating system and can be used as a standalone component, independent of the functionality of operating systems. Modules are available for integrating TinyUSB with FreeRTOS, RT-Thread, and Apache Mynewt. Energy-saving features are supported, such as transitioning to sleep mode and waking up upon activity. There is a preliminary implementation of the PD 3.0 (Power Delivery) protocol for managing power transfer over USB Type-C.

TinyUSB allows adding support for custom USB device and host classes without modifying the USB stack. Among the classes of devices already supported in TinyUSB are:
- UAC2 β Audio Class 2.0;
- BTH HCI β Bluetooth Host Controller Interface;
- CDC β Communication Device Class;
- DFU β Device Firmware Update;
- HID β Human Interface Device (keyboard, mouse, gamepad);
- MSC β Mass Storage Class (including drives with multiple logical devices);
- MIDI β Musical Instrument Digital Interface;
- MTP/PTP β Media Transfer Protocol;
- RNDIS, ECM (Ethernet Control Model) and NCM (Network Control Model) β network interaction via USB;
- USBTMC β Test and Measurement Class;
- UVC β Video class 1.5;
- WebUSB.
Supported classes of USB hosts:
- HID β Human Interface Device;
- MSC β Mass Storage Class;
- CDC-ACM β Communication Device Class;
- FTDI, CP210x, CH34x, PL2303 β serial port pass-through over USB;
- USB Hub.
The new release has expanded the API for devices and hosts. Support for multiple configuration devices has been added to the USB host implementation. Support for microcontrollers and boards has been added:
- ESP32-H4, ESP32-C5, ESP32-C61;
- STM32U0, STM32WBA, STM32N6;
- AT32F405, AT32F403A, AT32F415, AT32F423;
- CH32V305 and CH32V20x (USB host);
- MCXA156 SDK 2.16 and FRDM-MCXA156.
Source: opennet.ru
