{"id":13418103,"url":"https://github.com/hathach/tinyusb","last_synced_at":"2025-05-12T20:50:53.955Z","repository":{"id":5651835,"uuid":"6860771","full_name":"hathach/tinyusb","owner":"hathach","description":"An open source  cross-platform USB stack for embedded system","archived":false,"fork":false,"pushed_at":"2025-05-06T09:31:23.000Z","size":44766,"stargazers_count":5531,"open_issues_count":254,"forks_count":1164,"subscribers_count":133,"default_branch":"master","last_synced_at":"2025-05-06T10:46:25.984Z","etag":null,"topics":["embedded","midi","msc","tinyusb","usb","usb-cdc","usb-devices","usb-drive","usb-hid","usb-host","webusb"],"latest_commit_sha":null,"homepage":"https://www.tinyusb.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hathach.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"docs/contributing/code_of_conduct.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.rst","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-11-26T06:24:00.000Z","updated_at":"2025-05-05T23:40:25.000Z","dependencies_parsed_at":"2024-06-27T22:44:20.350Z","dependency_job_id":"2ee20e57-5763-48da-b5ed-fecb06df0846","html_url":"https://github.com/hathach/tinyusb","commit_stats":{"total_commits":5461,"total_committers":170,"mean_commits":32.12352941176471,"dds":"0.34004761032777875","last_synced_commit":"d875e694f8885b693888a7f183663775460ca920"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hathach%2Ftinyusb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hathach%2Ftinyusb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hathach%2Ftinyusb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hathach%2Ftinyusb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hathach","download_url":"https://codeload.github.com/hathach/tinyusb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253820869,"owners_count":21969594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","midi","msc","tinyusb","usb","usb-cdc","usb-devices","usb-drive","usb-hid","usb-host","webusb"],"created_at":"2024-07-30T22:00:58.516Z","updated_at":"2025-05-12T20:50:53.931Z","avatar_url":"https://github.com/hathach.png","language":"C","readme":"|Build Status| |CircleCI Status| |Documentation Status| |Fuzzing Status| |License|\n\nSponsors\n========\n\nTinyUSB is funded by: Adafruit. Purchasing products from them helps to support this project.\n\n.. figure:: docs/assets/adafruit_logo.svg\n   :alt: Adafruit Logo\n   :target: https://www.adafruit.com\n\nTinyUSB Project\n===============\n\n.. figure:: docs/assets/logo.svg\n   :alt: TinyUSB\n\nTinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function. Check out the online `documentation \u003chttps://docs.tinyusb.org/\u003e`__ for more details.\n\n.. figure:: docs/assets/stack.svg\n   :width: 500px\n   :alt: stackup\n\n::\n\n    .\n    ├── docs            # Documentation\n    ├── examples        # Examples with make and cmake build system\n    ├── hw\n    │   ├── bsp         # Supported boards source files\n    │   └── mcu         # Low level mcu core \u0026 peripheral drivers\n    ├── lib             # Sources from 3rd party such as FreeRTOS, FatFs ...\n    ├── src             # All sources files for TinyUSB stack itself.\n    ├── test            # Tests: unit test, fuzzing, hardware test\n    └── tools           # Files used internally\n\n\nGetting started\n===============\n\nSee the `online documentation \u003chttps://docs.tinyusb.org\u003e`_ for information about using TinyUSB and how it is implemented.\n\nCheck out `Getting Started`_ guide for adding TinyUSB to your project or building the examples. If you are new to TinyUSB, we recommend starting with the ``cdc_msc`` example. There is a handful of `Supported Boards`_ that should work out of the box.\n\nWe use `GitHub Discussions \u003chttps://github.com/hathach/tinyusb/discussions\u003e`_ as our forum. It is a great place to ask questions and advice from the community or to discuss your TinyUSB-based projects.\n\nFor bugs and feature requests, please `raise an issue \u003chttps://github.com/hathach/tinyusb/issues\u003e`_ and follow the templates there.\n\nSee `Porting`_ guide for adding support for new MCUs and boards.\n\nDevice Stack\n============\n\nSupports multiple device configurations by dynamically changing USB descriptors, low power functions such like suspend, resume, and remote wakeup. The following device classes are supported:\n\n-  Audio Class 2.0 (UAC2)\n-  Bluetooth Host Controller Interface (BTH HCI)\n-  Communication Device Class (CDC)\n-  Device Firmware Update (DFU): DFU mode (WIP) and Runtime\n-  Human Interface Device (HID): Generic (In \u0026 Out), Keyboard, Mouse, Gamepad etc ...\n-  Mass Storage Class (MSC): with multiple LUNs\n-  Musical Instrument Digital Interface (MIDI)\n-  Network with RNDIS, Ethernet Control Model (ECM), Network Control Model (NCM)\n-  Test and Measurement Class (USBTMC)\n-  Video class 1.5 (UVC): work in progress\n-  Vendor-specific class support with generic In \u0026 Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.\n-  `WebUSB \u003chttps://github.com/WICG/webusb\u003e`__ with vendor-specific class\n\nIf you have a special requirement, ``usbd_app_driver_get_cb()`` can be used to write your own class driver without modifying the stack. Here is how the RPi team added their reset interface `raspberrypi/pico-sdk#197 \u003chttps://github.com/raspberrypi/pico-sdk/pull/197\u003e`_\n\nHost Stack\n==========\n\n- Human Interface Device (HID): Keyboard, Mouse, Generic\n- Mass Storage Class (MSC)\n- Communication Device Class: CDC-ACM\n- Vendor serial over USB: FTDI, CP210x, CH34x\n- Hub with multiple-level support\n\nSimilar to the Device Stack, if you have a special requirement, ``usbh_app_driver_get_cb()`` can be used to write your own class driver without modifying the stack.\n\nPower Delivery Stack\n====================\n\n- Power Delivery 3.0 (PD3.0) with USB Type-C support (WIP)\n- Super early stage, only for testing purpose\n- Only support STM32 G4\n\nOS Abstraction layer\n====================\n\nTinyUSB is completely thread-safe by pushing all Interrupt Service Request (ISR) events into a central queue, then processing them later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as Communication Device Class (CDC) FIFO. Therefore the stack needs to use some of the OS's basic APIs. Following OSes are already supported out of the box.\n\n- **No OS**\n- **FreeRTOS**\n- `RT-Thread \u003chttps://github.com/RT-Thread/rt-thread\u003e`_: `repo \u003chttps://github.com/RT-Thread-packages/tinyusb\u003e`_\n- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its `own repo \u003chttps://github.com/hathach/mynewt-tinyusb-example\u003e`_\n\nSupported CPUs\n==============\n\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Manufacturer | Family                      | Device | Host | Highspeed | Driver                 | Note              |\n+==============+=============================+========+======+===========+========================+===================+\n| Allwinner    | F1C100s/F1C200s             | ✔      |      | ✔         | sunxi                  | musb variant      |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Analog       | MAX3421E                    |        | ✔    | ✖         | max3421                | via SPI           |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | MAX32 650, 666, 690,        | ✔      |      | ✔         | musb                   | 1-dir ep          |\n|              | MAX78002                    |        |      |           |                        |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Brigetek     | FT90x                       | ✔      |      | ✔         | ft9xx                  | 1-dir ep          |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Broadcom     | BCM2711, BCM2837            | ✔      |      | ✔         | dwc2                   |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Dialog       | DA1469x                     | ✔      | ✖    | ✖         | da146xx                |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Espressif    | S2, S3                      | ✔      | ✔    | ✖         | dwc2 or esp32sx        |                   |\n|   ESP32      +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | P4                          | ✔      | ✔    | ✔         | dwc2                   |                   |\n+--------------+----+------------------------+--------+------+-----------+------------------------+-------------------+\n| GigaDevice   | GD32VF103                   | ✔      |      | ✖         | dwc2                   |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Infineon     | XMC4500                     | ✔      | ✔    | ✖         | dwc2                   |                   |\n+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n| MicroChip    | SAM | D11, D21, L21, L22    | ✔      |      | ✖         | samd                   |                   |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | D51, E5x              | ✔      |      | ✖         | samd                   |                   |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | G55                   | ✔      |      | ✖         | samg                   | 1-dir ep          |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | E70,S70,V70,V71       | ✔      |      | ✔         | samx7x                 | 1-dir ep          |\n|              +-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n|              | PIC | 24                    | ✔      |      |           | pic                    | ci_fs variant     |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | 32 mm, mk, mx         | ✔      |      |           | pic                    | ci_fs variant     |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | dsPIC33               | ✔      |      |           | pic                    | ci_fs variant     |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | 32mz                  | ✔      |      |           | pic32mz                | musb variant      |\n+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n| Mind Montion | mm32                        | ✔      |      | ✖         | mm32f327x_otg          | ci_fs variant     |\n+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n| NordicSemi   | nRF 52833, 52840, 5340      | ✔      | ✖    | ✖         | nrf5x                  | only ep8 is ISO   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Nuvoton      | NUC120                      | ✔      | ✖    | ✖         | nuc120                 |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | NUC121/NUC125               | ✔      | ✖    | ✖         | nuc121                 |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | NUC126                      | ✔      | ✖    | ✖         | nuc121                 |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | NUC505                      | ✔      |      | ✔         | nuc505                 |                   |\n+--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+\n| NXP          | iMXRT   | RT 10xx, 11xx     | ✔      | ✔    | ✔         | ci_hs                  |                   |\n|              +---------+-------------------+--------+------+-----------+------------------------+-------------------+\n|              | Kinetis | KL                | ✔      | ⚠    | ✖         | ci_fs, khci            |                   |\n|              |         +-------------------+--------+------+-----------+------------------------+-------------------+\n|              |         | K32L2             | ✔      |      | ✖         | khci                   | ci_fs variant     |\n|              +---------+-------------------+--------+------+-----------+------------------------+-------------------+\n|              | LPC     | 11u, 13, 15       | ✔      | ✖    | ✖         | lpc_ip3511             |                   |\n|              |         +-------------------+--------+------+-----------+------------------------+-------------------+\n|              |         | 17, 40            | ✔      | ⚠    | ✖         | lpc17_40               |                   |\n|              |         +-------------------+--------+------+-----------+------------------------+-------------------+\n|              |         | 18, 43            | ✔      | ✔    | ✔         | ci_hs                  |                   |\n|              |         +-------------------+--------+------+-----------+------------------------+-------------------+\n|              |         | 51u               | ✔      | ✖    | ✖         | lpc_ip3511             |                   |\n|              |         +-------------------+--------+------+-----------+------------------------+-------------------+\n|              |         | 54, 55            | ✔      |      | ✔         | lpc_ip3511             |                   |\n|              +---------+-------------------+--------+------+-----------+------------------------+-------------------+\n|              | MCX     | N9, A15           | ✔      |      | ✔         | ci_fs, ci_hs           |                   |\n+--------------+---------+-------------------+--------+------+-----------+------------------------+-------------------+\n| Raspberry Pi | RP2040, RP2350              | ✔      | ✔    | ✖         | rp2040, pio_usb        |                   |\n+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n| Renesas      | RX  | 63N, 65N, 72N         | ✔      | ✔    | ✖         | rusb2                  |                   |\n|              +-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n|              | RA  | 4M1, 4M3, 6M1         | ✔      | ✔    | ✖         | rusb2                  |                   |\n|              |     +-----------------------+--------+------+-----------+------------------------+-------------------+\n|              |     | 6M5                   | ✔      | ✔    | ✔         | rusb2                  |                   |\n+--------------+-----+-----------------------+--------+------+-----------+------------------------+-------------------+\n| Silabs       | EFM32GG12                   | ✔      |      | ✖         | dwc2                   |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| Sony         | CXD56                       | ✔      | ✖    | ✔         | cxd56                  |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| ST STM32     | F0                          | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | F1 | 102, 103               | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              |    +------------------------+--------+------+-----------+------------------------+-------------------+\n|              |    | 105, 107               | ✔      | ✔    | ✖         | dwc2                   |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | F2, F4, F7, H7              | ✔      | ✔    | ✔         | dwc2                   |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | F3                          | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | C0, G0, H5                  | ✔      |      | ✖         | stm32_fsdev            |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | G4                          | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | L0, L1                      | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | L4 | 4x2, 4x3               | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              |    +------------------------+--------+------+-----------+------------------------+-------------------+\n|              |    | 4x5, 4x6               | ✔      | ✔    | ✖         | dwc2                   |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | L4+                         | ✔      | ✔    | ✖         | dwc2                   |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | L5                          | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | U5 | 535, 545               | ✔      |      | ✖         | stm32_fsdev            |                   |\n|              |    +------------------------+--------+------+-----------+------------------------+-------------------+\n|              |    | 575, 585               | ✔      | ✔    | ✖         | dwc2                   |                   |\n|              |    +------------------------+--------+------+-----------+------------------------+-------------------+\n|              |    | 59x,5Ax,5Fx,5Gx        | ✔      | ✔    | ✔         | dwc2                   |                   |\n|              +----+------------------------+--------+------+-----------+------------------------+-------------------+\n|              | WBx5                        | ✔      | ✖    | ✖         | stm32_fsdev            |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| TI           | MSP430                      | ✔      | ✖    | ✖         | msp430x5xx             |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | MSP432E4                    | ✔      |      | ✖         | musb                   |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | TM4C123                     | ✔      |      | ✖         | musb                   |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| ValentyUSB   | eptri                       | ✔      | ✖    | ✖         | eptri                  |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n| WCH          | CH32F20x                    | ✔      |      | ✔         | ch32_usbhs             |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | CH32V20x                    | ✔      |      | ✖         | stm32_fsdev/ch32_usbfs |                   |\n|              +-----------------------------+--------+------+-----------+------------------------+-------------------+\n|              | CH32V307                    | ✔      |      | ✔         | ch32_usbfs/hs          |                   |\n+--------------+-----------------------------+--------+------+-----------+------------------------+-------------------+\n\nTable Legend\n------------\n\n========= =========================\n✔         Supported\n⚠         Partial support\n✖         Not supported by hardware\n\\[empty\\] Unknown\n========= =========================\n\n\n.. |Build Status| image:: https://github.com/hathach/tinyusb/actions/workflows/build.yml/badge.svg\n   :target: https://github.com/hathach/tinyusb/actions\n.. |CircleCI Status| image:: https://dl.circleci.com/status-badge/img/circleci/4AYHvUhFxdnY4rA7LEsdqW/QmrpoL2AjGqetvFQNqtWyq/tree/master.svg?style=svg\n   :target: https://dl.circleci.com/status-badge/redirect/circleci/4AYHvUhFxdnY4rA7LEsdqW/QmrpoL2AjGqetvFQNqtWyq/tree/master\n.. |Documentation Status| image:: https://readthedocs.org/projects/tinyusb/badge/?version=latest\n   :target: https://docs.tinyusb.org/en/latest/?badge=latest\n.. |Fuzzing Status| image:: https://oss-fuzz-build-logs.storage.googleapis.com/badges/tinyusb.svg\n   :target: https://oss-fuzz-build-logs.storage.googleapis.com/index.html#tinyusb\n.. |License| image:: https://img.shields.io/badge/license-MIT-brightgreen.svg\n   :target: https://opensource.org/licenses/MIT\n\n\n.. _Changelog: docs/info/changelog.rst\n.. _Contributors: CONTRIBUTORS.rst\n.. _Getting Started: docs/reference/getting_started.rst\n.. _Supported Boards: docs/reference/boards.rst\n.. _Dependencies: docs/reference/dependencies.rst\n.. _Concurrency: docs/reference/concurrency.rst\n.. _Contributing: docs/contributing/index.rst\n.. _Code of Conduct: CODE_OF_CONDUCT.rst\n.. _Porting: docs/contributing/porting.rst\n","funding_links":[],"categories":["C","Peripheral","Libraries","communication","Hardware"],"sub_categories":["USB","usb"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhathach%2Ftinyusb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhathach%2Ftinyusb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhathach%2Ftinyusb/lists"}