From f48fa44368ac49911274afaae5b40025bc1496a3 Mon Sep 17 00:00:00 2001 From: MDLZCOOL Date: Fri, 28 Mar 2025 13:27:52 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20README=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=BB=93=E6=9E=84=E5=92=8C=E5=86=85=E5=AE=B9=20(#300)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: 更新 README 文件结构和内容 - 统一文字,英文文档中不应该出现中文字符 - 在 README.md 中添加简体中文和繁体中文版本的链接 - 重新组织 README.md 的结构,优化标题层级 - 删除冗余的空行和不必要的标点符号 * docs: 更新 README 文件结构和内容 - 统一文字,英文文档中不应该出现中文字符 - 在 README.md 中添加简体中文和繁体中文版本的链接 - 重新组织 README.md 的结构,优化标题层级 - 删除冗余的空行和不必要的标点符号 * docs: 更新文档格式和内容 - 调整表格格式,使其更加规范和易读 * docs:修复 README 文件中的徽章链接 - 修复docs中没有正确闭合的标签 * docs: 移除了 README_zh-TW.md * docs: 移除 README_zh-CN.md 重新添加 README_zh.md 文件 --- README.md | 36 ++++++++++++++++-------------------- README_zh.md | 31 ++++++++++++++----------------- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 25e7f0b6..109c175c 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,18 @@ +**English | [简体中文](README_zh-CN.md)** +

CherryUSB

- +

-

- 中文 - | - English -

- CherryUSB is a tiny and beautiful, high performance and portable USB host and device stack for embedded system with USB IP. ![CherryUSB](CherryUSB.svg) -## Why choose +## Why choose CherryUSB ### Easy to study USB @@ -62,7 +58,7 @@ Taking into account USB performance issues and trying to achieve the theoretical CherryUSB Device Stack provides a unified framework of functions for standard device requests, CLASS requests, VENDOR requests and custom special requests. The object-oriented and chained approach allows the user to quickly get started with composite devices without having to worry about the underlying logic. At the same time, a standard dcd porting interface has been standardised for adapting different USB IPs to achieve ip-oriented programming. -CherryUSB Device Stack has the following functions: +CherryUSB Device Stack has the following functions: - Support USB2.0 full and high speed, USB3.0 super speed - Support endpoint irq callback register by users, let users do whatever they wants in endpoint irq callback. @@ -70,12 +66,12 @@ CherryUSB Device Stack has the following functions: - Support Communication Device Class (CDC_ACM, CDC_ECM) - Support Human Interface Device (HID) - Support Mass Storage Class (MSC) -- Support USB VIDEO CLASS (UVC1.0、UVC1.5) -- Support USB AUDIO CLASS (UAC1.0、UAC2.0) +- Support USB VIDEO CLASS (UVC1.0, UVC1.5) +- Support USB AUDIO CLASS (UAC1.0, UAC2.0) - Support Device Firmware Upgrade CLASS (DFU) - Support USB MIDI CLASS (MIDI) - Support Remote NDIS (RNDIS) -- Support WINUSB1.0、WINUSB2.0、WEBUSB、BOS +- Support WINUSB1.0, WINUSB2.0, WEBUSB, BOS - Support Vendor class - Support UF2 - Support Android Debug Bridge (Only support shell) @@ -95,9 +91,9 @@ CherryUSB Device Stack resource usage (GCC 10.2 with -O2): ## Host Stack Overview -The CherryUSB Host Stack has a standard enumeration implementation for devices mounted on roothubs and external hubs, and a standard interface for different Classes to indicate what the Class driver needs to do after enumeration and after disconnection. A standard hcd porting interface has also been standardised for adapting different USB IPs for IP-oriented programming. Finally, the host stack is managed using os, and provides osal to make a adaptation for different os. +The CherryUSB Host Stack has a standard enumeration implementation for devices mounted on root hubs and external hubs, and a standard interface for different Classes to indicate what the Class driver needs to do after enumeration and after disconnection. A standard hcd porting interface has also been standardised for adapting different USB IPs for IP-oriented programming. Finally, the host stack is managed using os, and provides osal to make a adaptation for different os. -CherryUSB Host Stack has the following functions: +CherryUSB Host Stack has the following functions: - Support low speed, full speed, high speed and super speed devices - Automatic loading of supported Class drivers @@ -107,7 +103,7 @@ CherryUSB Host Stack has the following functions: - Support Communication Device Class (CDC_ACM, CDC_ECM) - Support Human Interface Device (HID) - Support Mass Storage Class (MSC) -- Support USB Video CLASS (UVC1.0、UVC1.5) +- Support USB Video CLASS (UVC1.0, UVC1.5) - Support USB Audio CLASS (UAC1.0) - Support Remote NDIS (RNDIS) - Support USB Bluetooth class (support nimble and zephyr bluetooth stack, support **CLASS:0xE0** or vendor class like cdc acm) @@ -134,7 +130,7 @@ CherryUSB Host Stack resource usage (GCC 10.2 with -O2): |usbh_cdc_ncm.c | ~3300 | 2 * 2048(default) + 16 + 32 | sizeof(struct usbh_cdc_ncm) * 1 | 0 | |usbh_bluetooth.c | ~1000 | 2 * 2048(default) | sizeof(struct usbh_bluetooth) * 1 | 0 | -Among them, `sizeof(struct usbh_hub)` and `sizeof(struct usbh_hubport)` are affected by the following macros: +Among them, `sizeof(struct usbh_hub)` and `sizeof(struct usbh_hubport)` are affected by the following macros: ``` #define CONFIG_USBHOST_MAX_EXTHUBS 1 @@ -144,7 +140,7 @@ Among them, `sizeof(struct usbh_hub)` and `sizeof(struct usbh_hubport)` are affe #define CONFIG_USBHOST_MAX_ENDPOINTS 4 ``` -x is affected by the following macros: +x is affected by the following macros: ``` #define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4 @@ -174,7 +170,7 @@ Only standard and commercial USB IP are listed. ## Documentation Tutorial -Quickly start, USB basic concepts, API manual, Class basic concepts and examples, see [CherryUSB Documentation Tutorial](https://cherryusb.readthedocs.io/) +Quickly start, USB basic concepts, API manual, Class basic concepts and examples, see [CherryUSB Documentation Tutorial](https://cherryusb.readthedocs.io/). ## Video Tutorial @@ -182,7 +178,7 @@ USB basic concepts and how the CherryUSB Device stack is implemented, see [Cherr ## Graphical Config Tool -[chryusb_configurator](https://github.com/Egahp/chryusb_configurator) is written in **electron + vite2 + ts** framework,currently used to automate the generation of descriptor arrays, with additional functionality to be added later. +[chryusb_configurator](https://github.com/Egahp/chryusb_configurator) is written in **electron + vite2 + ts** framework, currently used to automate the generation of descriptor arrays, with additional functionality to be added later. ## Demo Repo @@ -222,6 +218,6 @@ CherryUSB discord: https://discord.com/invite/wFfvrSAey8. ## Company Support -Thanks to the following companies for their support (in no particular order). +Thanks to the following companies for their support (in no particular order): diff --git a/README_zh.md b/README_zh.md index 8a5bb45d..ad344523 100644 --- a/README_zh.md +++ b/README_zh.md @@ -1,22 +1,18 @@ +**[English](README.md) | 简体中文** +

CherryUSB

- +

-

- 中文 - | - English -

- -CherryUSB 是一个小而美的、可移植性高的、用于嵌入式系统(带 USB IP)的高性能 USB 主从协议栈。 +CherryUSB 是一个小而美的、可移植性高的、用于嵌入式系统(带 USB IP)的高性能 USB 主从协议栈。 ![CherryUSB](CherryUSB.svg) -## 为什么选择 +## 为什么选择 CherryUSB ### 易于学习 USB @@ -95,7 +91,7 @@ CherryUSB Device 协议栈资源占用说明(GCC 10.2 with -O2): ## Host 协议栈简介 -CherryUSB Host 协议栈对挂载在 roothub、外部 hub 上的设备规范了一套标准的枚举实现,对不同的 Class 类也规范了一套标准接口,用来指示在枚举后和断开连接后该 Class 驱动需要做的事情。同时,规范了一套标准的 hcd porting 接口,用于适配不同的 USB IP,达到面向 IP 编程。最后,协议栈使用 OS 管理,并提供了 osal 用来适配不同的 os。 +CherryUSB Host 协议栈对挂载在 root hub、外部 hub 上的设备规范了一套标准的枚举实现,对不同的 Class 类也规范了一套标准接口,用来指示在枚举后和断开连接后该 Class 驱动需要做的事情。同时,规范了一套标准的 hcd porting 接口,用于适配不同的 USB IP,达到面向 IP 编程。最后,协议栈使用 OS 管理,并提供了 osal 用来适配不同的 os。 CherryUSB Host 协议栈当前实现以下功能: @@ -103,7 +99,7 @@ CherryUSB Host 协议栈当前实现以下功能: - 自动加载支持的Class 驱动 - 支持阻塞式传输和异步传输 - 支持复合设备 -- 支持多级 HUB,最高可拓展到 7 级(目前测试 1拖 10 没有问题,仅支持 dwc2/ehci/xhci/rp2040) +- 支持多级 HUB,最高可拓展到 7 级(目前测试 1拖 10 没有问题,仅支持 dwc2/ehci/xhci/rp2040) - 支持 Communication Device Class (CDC_ACM, CDC_ECM) - 支持 Human Interface Device (HID) - 支持 Mass Storage Class (MSC) @@ -174,12 +170,12 @@ x 受以下宏影响: ## 文档教程 -CherryUSB 快速入门、USB 基本概念,API 手册,Class 基本概念和例程,参考 [CherryUSB Documentation Tutorial](https://cherryusb.readthedocs.io/) +CherryUSB 快速入门、USB 基本概念、API 手册、Class 基本概念和例程,参考 [CherryUSB Documentation Tutorial](https://cherryusb.readthedocs.io/)。 ## 视频教程 -- USB 基本知识点与 CherryUSB Device 协议栈是如何编写的(使用v0.4.1 版本),参考 https://www.bilibili.com/video/BV1Ef4y1t73d. -- CherryUSB 腾讯会议(使用v1.1.0 版本),参考 https://www.bilibili.com/video/BV16x421y7mM. +- USB 基本知识点与 CherryUSB Device 协议栈是如何编写的(使用 v0.4.1 版本),参考 https://www.bilibili.com/video/BV1Ef4y1t73d 。 +- CherryUSB 腾讯会议(使用 v1.1.0 版本),参考 https://www.bilibili.com/video/BV16x421y7mM 。 ## 图形化界面配置工具 @@ -207,7 +203,7 @@ CherryUSB 快速入门、USB 基本概念,API 手册,Class 基本概念和 ## 软件包支持 -CherryUSB 软件包可以通过以下方式获取: +CherryUSB 软件包可以通过以下方式获取: - [RT-Thread](https://packages.rt-thread.org/detail.html?package=CherryUSB) - [YOC](https://www.xrvm.cn/document?temp=usb-host-protocol-stack-device-driver-adaptation-instructions&slug=yocbook) @@ -219,11 +215,12 @@ CherryUSB 软件包可以通过以下方式获取: ## 联系 -CherryUSB QQ 群:642693751 +CherryUSB QQ群:642693751 + CherryUSB 微信群:与我联系后邀请加入 ## 支持企业 -感谢以下企业支持(顺序不分先后)。 +感谢以下企业支持(顺序不分先后):