index.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. .. CherryUSB User Guide documentation master file, created by
  2. sphinx-quickstart on Thu Nov 21 10:50:33 2019.
  3. You can adapt this file completely to your liking, but it should at least
  4. contain the root `toctree` directive.
  5. CherryUSB User Guide
  6. ====================================================================
  7. CherryUSB is a small, lightweight, portable USB host and device protocol stack for embedded systems. CherryUSB offers the following advantages:
  8. **Easy to Learn USB**
  9. To facilitate user learning of USB fundamentals, enumeration, driver loading, and IP drivers, the written code has the following advantages:
  10. - Streamlined code with simple logic and no complex C language syntax
  11. - Tree-structured programming with progressive code layers
  12. - Templated and simplified Class drivers and porting drivers
  13. - Clear API categorization (Device: initialization, class registration, command callbacks, data transmission; Host: initialization, class discovery, data transmission)
  14. **Easy to Use USB**
  15. To facilitate user interaction with USB interfaces, considering users' familiarity with UART and DMA, the designed data transmission interface has the following advantages:
  16. - Equivalent to using UART TX DMA/UART RX DMA
  17. - No length restrictions on transmission/reception; users don't need to worry about USB packetization (porting drivers handle packetization)
  18. **Easy to Achieve USB Performance**
  19. Considering USB performance requirements to reach theoretical USB hardware bandwidth, the designed data transmission interface has the following advantages:
  20. - Porting drivers directly interface with registers without abstraction layer encapsulation
  21. - Memory zero copy
  22. - DMA mode used when IP supports DMA (DMA provides hardware packetization functionality)
  23. - No length restrictions, facilitating hardware DMA interfacing and maximizing DMA advantages
  24. - Packetization handled in interrupt context
  25. **Device Protocol Stack Overall Execution Flow**
  26. .. figure:: usbdev.svg
  27. **Host Protocol Stack Overall Execution Flow**
  28. .. figure:: usbhost.svg
  29. **Other Related Links**
  30. - **Video Tutorial**: https://www.bilibili.com/cheese/play/ss707687201
  31. - **GitHub**: https://github.com/sakumisu/CherryUSB
  32. - **CherryUSB Theoretical Analysis and Application Practice - Hans Journal**: https://www.hanspub.org/journal/paperinformation?paperid=126903
  33. .. toctree::
  34. :maxdepth: 1
  35. :caption: Quick Start
  36. quick_start/start
  37. quick_start/demo
  38. quick_start/transplant
  39. quick_start/rtthread
  40. quick_start/q&a
  41. quick_start/migration
  42. quick_start/opensource
  43. .. toctree::
  44. :maxdepth: 1
  45. :caption: USB Basic Knowledge
  46. usb/usb2.0_basic
  47. usb/usb3.0_basic
  48. usb/usb_desc
  49. usb/usb_request
  50. usb/usb_enum
  51. usb/usb_ext
  52. .. toctree::
  53. :maxdepth: 1
  54. :caption: API Manual
  55. api/api_device
  56. api/api_host
  57. api/api_port
  58. api/api_config
  59. .. toctree::
  60. :maxdepth: 1
  61. :caption: Class Guide
  62. class/class_cdc
  63. class/class_hid
  64. class/class_msc
  65. class/class_audio
  66. class/class_video
  67. class/winusb
  68. .. toctree::
  69. :maxdepth: 1
  70. :caption: Examples
  71. demo/usbd_cdc_acm
  72. demo/usbd_hid
  73. demo/usbd_msc
  74. demo/usbd_audiov1
  75. demo/usbd_audiov2
  76. demo/usbd_video
  77. demo/usbd_winusb
  78. demo/usbd_webusb
  79. demo/usbd_rndis
  80. demo/usbd_ecm
  81. demo/usbd_adb
  82. demo/usbd_mtp
  83. demo/usbh_serial
  84. demo/usbh_hid
  85. demo/usbh_msc
  86. demo/usbh_net
  87. demo/usbh_bluetooth
  88. demo/usbh_wifi
  89. demo/usbh_audio
  90. demo/usbh_video
  91. demo/usb_otg
  92. demo/usbd_vendor
  93. demo/usbh_vendor
  94. .. toctree::
  95. :maxdepth: 1
  96. :caption: USB IP Introduction
  97. usbip/ohci
  98. usbip/ehci
  99. usbip/xhci
  100. usbip/chipidea
  101. usbip/dwc2
  102. usbip/musb
  103. usbip/fotg210
  104. usbip/cdns2
  105. usbip/cdns3
  106. usbip/dwc3
  107. .. toctree::
  108. :maxdepth: 1
  109. :caption: Tools Usage
  110. tools/index
  111. .. toctree::
  112. :maxdepth: 1
  113. :caption: Release Notes
  114. version
  115. .. toctree::
  116. :maxdepth: 1
  117. :caption: Performance Showcase
  118. show/index
  119. .. toctree::
  120. :maxdepth: 1
  121. :caption: Commercial Support
  122. support/index