index.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. - 代码精简,并且内存占用极小,而且还可进一步的裁剪
  9. - 全面的 class 驱动,并且主从 class 驱动全部模板化,方便用户增加新的 class 驱动以及学习的时候查找规律
  10. - 可供用户使用的 API 非常少,并且分类清晰。从机:初始化 + 注册、命令回调类、数据收发类;主机:初始化 + 查找类、数据收发类
  11. - 树状化编程,代码层层递进,方便用户理清函数调用关系、枚举和 class 驱动加载过程
  12. - 标准化的 porting 接口,相同 ip 无需重写驱动,并且 porting 驱动也进行了模板化,方便用户新增 porting。
  13. - 主从收发接口的使用等价于 uart tx/rx dma 的使用,长度也没有限制
  14. - 能够达到 USB 硬件理论带宽
  15. 从机协议栈整体执行流程:
  16. .. figure:: usbdev.svg
  17. 主机协议栈整体执行流程:
  18. .. figure:: usbhost.svg
  19. 其他相关链接:
  20. - **CherryUSB 大纲** https://www.bilibili.com/video/BV1st4y1H7K2
  21. - **从机协议栈视频教程** https://www.bilibili.com/video/BV1Ef4y1t73d
  22. - **主机协议栈视频教程** TODO
  23. - **github** https://github.com/sakumisu/CherryUSB
  24. .. toctree::
  25. :maxdepth: 1
  26. :caption: 快速上手
  27. quick_start/bl702
  28. quick_start/stm32
  29. quick_start/hpm
  30. quick_start/es32
  31. quick_start/rt-thread/rtthread
  32. quick_start/other_chip
  33. .. toctree::
  34. :maxdepth: 1
  35. :caption: USB 基本知识点
  36. usb/usb2.0_basic
  37. usb/usb3.0_basic
  38. usb/usb_desc
  39. usb/usb_request
  40. usb/usb_enum
  41. .. toctree::
  42. :maxdepth: 1
  43. :caption: API 手册
  44. api/api_device
  45. api/api_host
  46. api/api_port
  47. api/api_common
  48. api/api_config
  49. .. toctree::
  50. :maxdepth: 1
  51. :caption: Class 指南
  52. class/class_cdc
  53. class/class_hid
  54. class/class_msc
  55. class/class_audio
  56. class/class_video
  57. class/winusb
  58. .. toctree::
  59. :maxdepth: 1
  60. :caption: 基本例程
  61. demo/cdc_acm
  62. demo/msc_ram
  63. demo/audio_mic_speaker
  64. demo/usb_video
  65. .. toctree::
  66. :maxdepth: 1
  67. :caption: Porting 说明
  68. porting
  69. porting_usbip
  70. .. toctree::
  71. :maxdepth: 1
  72. :caption: 工具使用
  73. tools/index