From a623d2eff286b95de1d2986c2b2ffd64a48bb5ed Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sat, 29 Jan 2022 23:36:16 +0800 Subject: update host stack readme --- README.md | 25 ++++++++++++++++++++++--- README_zh.md | 28 +++++++++++++++++++++++----- docs/img/lsusb.png | Bin 0 -> 72887 bytes 3 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 docs/img/lsusb.png diff --git a/README.md b/README.md index ea5486df..92d3349a 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ USB Stack is a tiny, beautiful and portable USB host and device stack for embedd ├── bouffalolab │ └── bl702 ├── ch32 + ├── ehci ├── fsdev ├── mm32 ├── synopsys @@ -60,8 +61,8 @@ USB Device Stack has the following functions: - Support USB2.0 full and high speed - Support endpoint irq callback register by users, let users do whatever they wants in endpoint irq callback. -- Support Composite class -- Support Communication Class (CDC) +- Support Compound and Composite Device +- Support Communication Device Class (CDC) - Support Human Interface Device (HID) - Support Custom human Interface Device (HID) - Support Mass Storage Class (MSC) @@ -86,7 +87,25 @@ USB Device Stack resource usage: ## USB Host Stack Overview -waiting.... +The USB Host Stack has a standard enumeration implementation for devices mounted on roothubs and external hubs, and a standard interface for the different Class 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 protocol stack is managed using os, and provides osal to make a adaptation to different os. + +How USB Host Stack is implemented, the video will be provided in future. + +USB Host Stack has the following functions: + +- Automatic loading of supported Class drivers +- Support blocking transfers and asynchronous transfers +- Support Compound and Composite Device +- Multi-level HUB support, expandable up to 7 levels +- Support Communication Device Class (CDC) +- Support Human Interface Device (HID) +- Support Mass Storage Class (MSC) +- Support Vendor class +- Support Andriod AOA Communication + +The USB Host stack also provides the lsusb function, which allows you to view information about all mounted devices, including those on external hubs, with the help of a shell plugin. + +![lsusb](docs/img/lsusb.png) ## USB Device API diff --git a/README_zh.md b/README_zh.md index 73d40741..e7bddb7a 100644 --- a/README_zh.md +++ b/README_zh.md @@ -32,6 +32,7 @@ USB Stack 是一个小而美的、可移植性高的、用于嵌入式系统的 ├── bouffalolab │ └── bl702 ├── ch32 + ├── ehci ├── fsdev ├── mm32 ├── synopsys @@ -42,8 +43,8 @@ USB Stack 是一个小而美的、可移植性高的、用于嵌入式系统的 | 目录名 | 描述 | |:-------------:|:------------------------------:| |class | usb class 类主从驱动 | -|common | usb spec 定义和一些常用函数 | -|core | usb 主从核心实现 | +|common | usb spec 定义、常用宏、标准接口定义 | +|core | usb 主从协议栈核心实现 | |demo | 示例 | |docs | 文档 | |osal | os 封装层 | @@ -60,8 +61,8 @@ USB Device 协议栈当前实现以下功能: - 支持 USB2.0 全速和高速设备 - 支持端点中断注册功能,porting 给用户自己处理中断里的数据 -- 支持复合设备 -- 支持 Communication Class (CDC) +- 支持复合设备和组合设备 +- 支持 Communication Device Class (CDC) - 支持 Human Interface Device (HID) - 支持 Custom human Interface Device (HID) - 支持 Mass Storage Class (MSC) @@ -86,7 +87,24 @@ USB Device 协议栈资源占用说明: ## USB Host 协议栈简介 -waiting.... +USB Host 协议栈对挂载在 roothub、外部 hub 上的设备规范了一套标准的枚举实现,对不同的 Class 类也规范了一套标准接口,用来指示在枚举后和断开连接后该 Class 驱动需要做的事情。同时,规范了一套标准的 hcd porting 接口,用于适配不同的 USB IP,达到面向 IP 编程。最后,协议栈使用 OS 管理,并提供了 osal 用来适配不同的 os。 + +USB Host 协议栈的代码实现过程参考:视频后续发布。 + +USB Host 协议栈当前实现以下功能: + +- 自动加载支持的Class 驱动 +- 支持阻塞式传输和异步传输 +- 支持复合设备和组合设备 +- 支持多级 HUB,最高可拓展到 7 级 +- 支持 Communication Device Class (CDC) +- 支持 Human Interface Device (HID) +- 支持 Mass Storage Class (MSC) +- 支持安卓 AOA Communication + +同时,USB Host 协议栈还提供了 lsusb 的功能,借助 shell 插件可以查看所有挂载设备的信息,包括外部 hub 上的设备的信息。 + +![lsusb](docs/img/lsusb.png) ## USB Device API diff --git a/docs/img/lsusb.png b/docs/img/lsusb.png new file mode 100644 index 00000000..65d5547e Binary files /dev/null and b/docs/img/lsusb.png differ -- cgit v1.3.1