index.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. .. CherryUSB 使用指南 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 使用指南
  6. ======================================================
  7. CherryUSB 是一个小而美的、可移植性高的、用于嵌入式系统的 USB 主从协议栈。同时 CherryUSB 具有以下优点:
  8. **易于学习 USB**
  9. 为了方便用户学习 USB 基本知识、枚举、驱动加载、IP 驱动,因此,编写的代码具备以下优点:
  10. - 代码精简,逻辑简单,无复杂 C 语言语法
  11. - 树状化编程,代码层层递进
  12. - Class 驱动和 porting 驱动模板化、精简化
  13. - API 分类清晰(从机:初始化、注册类、命令回调类、数据收发类;主机:初始化、查找类、数据收发类)
  14. **易于使用 USB**
  15. 为了方便用户使用 USB 接口,考虑到用户学习过 uart 和 dma,因此,设计的数据收发类接口具备以下优点:
  16. - 等价于使用 uart tx dma/uart rx dma
  17. - 收发长度没有限制,用户不需要关心 USB 分包过程(porting 驱动做分包过程)
  18. **易于发挥 USB 性能**
  19. 考虑到 USB 性能问题,尽量达到 USB 硬件理论带宽,因此,设计的数据收发类接口具备以下优点:
  20. - Porting 驱动直接对接寄存器,无抽象层封装
  21. - Memory zero copy
  22. - IP 如果带 DMA 则使用 DMA 模式(DMA 带硬件分包功能)
  23. - 长度无限制,方便对接硬件 DMA 并且发挥 DMA 的优势
  24. - 分包功能在中断中处理
  25. **从机协议栈整体执行流程**
  26. .. figure:: usbdev.svg
  27. **主机协议栈整体执行流程**
  28. .. figure:: usbhost.svg
  29. **其他相关链接**
  30. - **CherryUSB 大纲** https://www.bilibili.com/video/BV1st4y1H7K2
  31. - **CherryUSB 从机协议栈视频教程** https://www.bilibili.com/video/BV1Ef4y1t73d
  32. - **CherryUSB 腾讯会议** https://www.bilibili.com/video/BV16x421y7mM
  33. - **github** https://github.com/sakumisu/CherryUSB
  34. .. toctree::
  35. :maxdepth: 1
  36. :caption: 快速上手
  37. quick_start/start
  38. quick_start/demo
  39. quick_start/transplant
  40. quick_start/rtthread
  41. quick_start/esp
  42. q&a
  43. opensource
  44. share
  45. .. toctree::
  46. :maxdepth: 1
  47. :caption: USB 基本知识点
  48. usb/usb2.0_basic
  49. usb/usb3.0_basic
  50. usb/usb_desc
  51. usb/usb_request
  52. usb/usb_enum
  53. usb/usb_ext
  54. .. toctree::
  55. :maxdepth: 1
  56. :caption: API 手册
  57. api/api_device
  58. api/api_host
  59. api/api_port
  60. api/api_config
  61. .. toctree::
  62. :maxdepth: 1
  63. :caption: Class 指南
  64. class/class_cdc
  65. class/class_hid
  66. class/class_msc
  67. class/class_audio
  68. class/class_video
  69. class/winusb
  70. .. toctree::
  71. :maxdepth: 1
  72. :caption: 例程说明
  73. demo/usbd_cdc_acm
  74. demo/usbd_hid
  75. demo/usbd_msc
  76. demo/usbd_rndis
  77. demo/usbd_ecm
  78. demo/usbd_audiov1
  79. demo/usbd_audiov2
  80. demo/usbd_video
  81. demo/usbd_winusb
  82. demo/usbd_webusb
  83. demo/usbd_adb
  84. demo/usbh_serial
  85. demo/usbh_hid
  86. demo/usbh_msc
  87. demo/usbh_net
  88. demo/usbh_bluetooth
  89. demo/usbh_wifi
  90. demo/usbd_vendor
  91. demo/usbh_vendor
  92. .. toctree::
  93. :maxdepth: 1
  94. :caption: USBIP 介绍
  95. usbip/ohci
  96. usbip/ehci
  97. usbip/xhci
  98. usbip/chipidea
  99. usbip/dwc2
  100. usbip/musb
  101. usbip/fotg210
  102. usbip/cdns2
  103. usbip/cdns3
  104. usbip/dwc3
  105. .. toctree::
  106. :maxdepth: 1
  107. :caption: 工具使用
  108. tools/index
  109. .. toctree::
  110. :maxdepth: 1
  111. :caption: 版本说明
  112. version
  113. .. toctree::
  114. :maxdepth: 1
  115. :caption: 性能展示
  116. show/index
  117. .. toctree::
  118. :maxdepth: 1
  119. :caption: 商业支持
  120. support/index