IT lexicon › Programming › TinyUSB

TinyUSB

Programming På svenska → Updated: 2026-11-04

An open-source USB stack for microcontrollers that handles both device and host roles without a single dynamic allocation.

Ha Thach started it as a side project, and it has since become the default answer to "how do I make this microcontroller show up as a keyboard, a serial port or a flash drive?". Raspberry Pi's Pico SDK, Espressif's ESP-IDF and CircuitPython all ship it, and Adafruit funds a good share of the work. It is MIT-licensed.

The design is built around embedded constraints. Every buffer is statically allocated, and the interrupt handler does little more than push an event onto a queue. The actual protocol work happens when the application calls tud_task() from its main loop or an RTOS task. That keeps interrupts short — precisely the discipline vendor USB libraries tend to forget.

← Back to the lexicon