diff options
| author | sakumisu <[email protected]> | 2022-07-03 22:14:23 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2022-07-03 22:14:23 +0800 |
| commit | 174a07fb898291e0ca2e8dadc4384d3962de1320 (patch) | |
| tree | 7c3a6b87ab523794961adc69f3f5f536adf7b282 /docs/source | |
| parent | 3d615a1c668bed4af9c99c8a56b20e8d411c7912 (diff) | |
update readme
Diffstat (limited to 'docs/source')
| -rw-r--r-- | docs/source/api/api_device.rst | 25 | ||||
| -rw-r--r-- | docs/source/index.rst | 11 |
2 files changed, 6 insertions, 30 deletions
diff --git a/docs/source/api/api_device.rst b/docs/source/api/api_device.rst index fff16d48..708659d7 100644 --- a/docs/source/api/api_device.rst +++ b/docs/source/api/api_device.rst @@ -241,7 +241,7 @@ CDC ACM usbd_cdc_add_acm_interface """""""""""""""""""""""""""""""""""" -``usbd_cdc_add_acm_interface`` 用来给 USB CDC ACM 类添加接口,并实现该接口相关的函数: +``usbd_cdc_add_acm_interface`` 用来给 USB CDC ACM 类添加接口,并实现该接口相关的函数。 - ``cdc_acm_class_request_handler`` 用来处理 USB CDC ACM 类 Setup 请求。 - ``cdc_notify_handler`` 用来处理 USB CDC 其他中断回调函数。 @@ -339,29 +339,6 @@ usbd_hid_report_descriptor_register - **desc** 报告描述符 - **desc_len** 报告描述符长度 -usbd_hid_set_request_callback -"""""""""""""""""""""""""""""""""""" - -``usbd_hid_set_request_callback`` 用来注册 hid 类请求命令的回调函数。 - -.. code-block:: C - - void usbd_hid_set_request_callback( uint8_t intf_num, - uint8_t (*get_report_callback)(uint8_t report_id, uint8_t report_type), - void (*set_report_callback)(uint8_t report_id, uint8_t report_type, uint8_t *report, uint8_t report_len), - uint8_t (*get_idle_callback)(uint8_t report_id), - void (*set_idle_callback)(uint8_t report_id, uint8_t duration), - void (*set_protocol_callback)(uint8_t protocol), - uint8_t (*get_protocol_callback)(void)); - -- **intf_num** 当前 hid 报告描述符所在接口偏移 -- **get_report_callback** get report命令处理回调函数 -- **set_report_callback** set report命令处理回调函数 -- **get_idle_callback** get idle命令处理回调函数 -- **set_idle_callback** set idle命令处理回调函数 -- **set_protocol_callback** set protocol命令处理回调函数 -- **get_protocol_callback** get protocol命令处理回调函数 - MSC ----------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index b78b5a44..bf88bb3e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -8,13 +8,12 @@ CherryUSB 使用指南 CherryUSB 是一个小而美的、可移植性高的、用于嵌入式系统的 USB 主从协议栈。同时 CherryUSB 具有以下优点: -- 比较全面的 class 驱动,并且 class 驱动全部模板化,方便自主添加 -- 协议栈采用链表动态注册的方式,减少内存占用 -- 树状化编程,方便理清 class 驱动与接口、端点的关系,hub、port、class 之间的关系 -- 标准化的 porting 接口 +- 比较全面的 class 驱动,并且 class 驱动全部模板化,方便学习和自主添加 +- 树状化编程,方便理清 class 驱动与接口、端点的关系,hub、port、class 之间的关系;代码层层递进,调用关系一目了然,方便理清 usb 枚举过程和 class 驱动加载 - 设备协议栈的使用简化到类如 uart 、dma 的使用,主机协议栈的使用简化到文件的使用 -- 协议栈实现代码简短,并且从上往下看完就能理清 usb 枚举过程和 class 加载机制 -- Api 少,并且分为三类:dcd/hcd api、注册 api、命令回调 api +- 标准化的 porting 接口,同时面向 ip 化编程,相同 ip 无需重复编写驱动 +- Api 少,分类清晰:dcd/hcd api、注册 api、命令回调 api +- 代码精简,内存占用极小,同时能够达到 usb 硬件能够达到的最大带宽 其他相关链接: |
