index.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. *********
  2. Reference
  3. *********
  4. .. figure:: ../assets/stack.png
  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. .. admonition:: Warning
  26. :class: warning
  27. Most active development is on the Device stack. The Host stack is under rework and largely untested.
  28. - Human Interface Device (HID): Keyboard, Mouse, Generic
  29. - Mass Storage Class (MSC)
  30. - Hub currently only supports 1 level of hub (due to my laziness)
  31. OS Abstraction layer
  32. ====================
  33. 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.
  34. - **No OS**
  35. - **FreeRTOS**
  36. - **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)
  37. License
  38. =======
  39. 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.
  40. Index
  41. =====
  42. .. toctree::
  43. :maxdepth: 2
  44. supported
  45. getting_started
  46. concurrency