blob: fcff03590302f1d2840544fa4de6a98f90615349 [file] [log] [blame]
Austin Schuh41baf202022-01-01 14:33:40 -08001*********
2Reference
3*********
4
5.. figure:: ../assets/stack.svg
6 :width: 1600px
7 :alt: stackup
8
9 representation of the TinyUSB stack.
10
11Device Stack
12============
13
14Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported:
15
16- Audio Class 2.0 (UAC2)
17- Bluetooth Host Controller Interface (BTH HCI)
18- Communication Class (CDC)
19- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme
20- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
21- Mass Storage Class (MSC): with multiple LUNs
22- Musical Instrument Digital Interface (MIDI)
23- Network with RNDIS, CDC-ECM (work in progress)
24- USB Test and Measurement Class (USBTMC)
25- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file.
26- `WebUSB <https://github.com/WICG/webusb>`__ with vendor-specific class
27
28If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface [raspberrypi/pico-sdk#197](https://github.com/raspberrypi/pico-sdk/pull/197)
29
30Host Stack
31==========
32
33- Human Interface Device (HID): Keyboard, Mouse, Generic
34- Mass Storage Class (MSC)
35- Hub currently only supports 1 level of hub (due to my laziness)
36
37OS Abstraction layer
38====================
39
40TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box.
41
42- **No OS**
43- **FreeRTOS**
44- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example)
45
46License
47=======
48
49All TinyUSB sources in the `src` folder are licensed under MIT license. However, each file can be individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
50
51Index
52=====
53
54.. toctree::
55 :maxdepth: 2
56
57 supported
58 getting_started
59 concurrency