index.rst 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. share
  44. .. toctree::
  45. :maxdepth: 1
  46. :caption: USB 基本知识点
  47. usb/usb2.0_basic
  48. usb/usb3.0_basic
  49. usb/usb_desc
  50. usb/usb_request
  51. usb/usb_enum
  52. usb/usb_ext
  53. .. toctree::
  54. :maxdepth: 1
  55. :caption: API 手册
  56. api/api_device
  57. api/api_host
  58. api/api_port
  59. api/api_config
  60. .. toctree::
  61. :maxdepth: 1
  62. :caption: Class 指南
  63. class/class_cdc
  64. class/class_hid
  65. class/class_msc
  66. class/class_audio
  67. class/class_video
  68. class/winusb
  69. .. toctree::
  70. :maxdepth: 1
  71. :caption: 例程说明
  72. demo/usbd_cdc_acm
  73. demo/usbd_hid
  74. demo/usbd_msc
  75. demo/usbd_rndis
  76. demo/usbd_ecm
  77. demo/usbd_audiov1
  78. demo/usbd_audiov2
  79. demo/usbd_video
  80. demo/usbd_winusb
  81. demo/usbd_webusb
  82. demo/usbh_serial
  83. demo/usbh_hid
  84. demo/usbh_msc
  85. demo/usbh_net
  86. demo/usbh_bluetooth
  87. demo/usbh_wifi
  88. demo/usbd_vendor
  89. demo/usbh_vendor
  90. .. toctree::
  91. :maxdepth: 1
  92. :caption: USBIP 介绍
  93. usbip/ohci
  94. usbip/ehci
  95. usbip/xhci
  96. usbip/chipidea
  97. usbip/dwc2
  98. usbip/musb
  99. usbip/fotg210
  100. usbip/cdns2
  101. usbip/cdns3
  102. usbip/dwc3
  103. .. toctree::
  104. :maxdepth: 1
  105. :caption: 工具使用
  106. tools/index
  107. .. toctree::
  108. :maxdepth: 1
  109. :caption: 版本说明
  110. version
  111. .. toctree::
  112. :maxdepth: 1
  113. :caption: 商业支持
  114. support/index