index.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. *********
  2. Reference
  3. *********
  4. .. figure:: ../assets/stack.svg
  5. :width: 1600px
  6. :alt: stackup
  7. representation of the TinyUSB stack.
  8. Device Stack
  9. ============
  10. Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported:
  11. - Audio Class 2.0 (UAC2)
  12. - Bluetooth Host Controller Interface (BTH HCI)
  13. - Communication Class (CDC)
  14. - Device Firmware Update (DFU): DFU mode (WIP) and Runtinme
  15. - Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ...
  16. - Mass Storage Class (MSC): with multiple LUNs
  17. - Musical Instrument Digital Interface (MIDI)
  18. - Network with RNDIS, CDC-ECM (work in progress)
  19. - USB Test and Measurement Class (USBTMC)
  20. - 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.
  21. - `WebUSB <https://github.com/WICG/webusb>`__ with vendor-specific class
  22. If 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>`__
  23. Host Stack
  24. ==========
  25. - Human Interface Device (HID): Keyboard, Mouse, Generic
  26. - Mass Storage Class (MSC)
  27. - Hub currently only supports 1 level of hub (due to my laziness)
  28. OS Abstraction layer
  29. ====================
  30. TinyUSB 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.
  31. - **No OS**
  32. - **FreeRTOS**
  33. - **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>`__
  34. License
  35. =======
  36. All 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.
  37. Index
  38. =====
  39. .. toctree::
  40. :maxdepth: 2
  41. supported
  42. getting_started
  43. concurrency