بدون توضیح

sakumisu 6c31c196d0 switch the order 3 سال پیش
class d7c2a0d571 modify video desc macro for universality 3 سال پیش
common a9f8d82c94 fix ep mps mask 3 سال پیش
core 6c31c196d0 switch the order 3 سال پیش
demo 4e503409fe add winusb1.0 template 3 سال پیش
docs f81506ce81 update device and host api 3 سال پیش
osal 68d1bc3f4f invert priority so that large number with high priority 3 سال پیش
packet capture 051d127cdc add packet capture 4 سال پیش
port 3d6216d201 add nuvoton register 3 سال پیش
third_party ad12809f00 add fatfs in demo 3 سال پیش
tools eff1268057 add chryusb_configurator submodule 4 سال پیش
.clang-format 8a143df509 first commit 4 سال پیش
.gitattributes 4ef4a9be98 add gitattributes 3 سال پیش
.gitignore 406036f6d2 update ignore file 4 سال پیش
.gitmodules fefad911b3 specify the submodule chryusb_configurator branch 4 سال پیش
LICENSE 8a143df509 first commit 4 سال پیش
README.md 9f44549ac5 update readme 3 سال پیش
README_zh.md 96f82d5ec8 update doc with Sphinx 3 سال پیش
SConscript f31d94c7f9 update sconscript and osal for rtthread 3 سال پیش
usb_config.h ba8c528918 use hport setup to replace class setup,move out test demo 3 سال پیش

README.md

CherryUSB

中文版

CherryUSB is a tiny, beautiful and portable USB host and device stack for embedded system.

CherryUSB Directoy Structure

.
├── class
│   ├── audio
│   ├── cdc
│   ├── dfu
│   ├── hid
│   ├── hub
│   ├── midi
│   ├── msc
│   ├── tmc
│   └── video
├── common
├── core
├── demo
│   ├── bouffalolab
│   └── stm32
│   └── mm32
│   └── ch32
├── docs
├── osal
├── packet capture
└── port
    ├── bouffalolab
    │   └── bl702
    ├── ch32
    ├── ehci
    ├── fsdev
    ├── mm32
    ├── synopsys
    ├── musb
    └── template
Directory Description
class usb class driver
common usb spec macros and utils
core usb core implementation
demo different chip demo
osal os wrapper
docs doc for guiding
packet capture packet capture file
port usb dcd and hcd porting

CherryUSB Device Stack Overview

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:

  • 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 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)
  • Support USB VIDEO CLASS (UVC)
  • Support USB AUDIO CLASS (UAC)
  • Support Device Firmware Upgrade CLASS (DFU)
  • Support USB MIDI CLASS (MIDI)
  • Support Test and Measurement CLASS (TMC)
  • Support Vendor class
  • Support WINUSB1.0、WINUSB2.0

CherryUSB Device Stack resource usage:

file FLASH (Byte) RAM (Byte)
usbd_core.c 3045 373
usbd_cdc.c 302 20
usbd_msc.c 2452 132
usbd_hid.c 784 201
usbd_audio.c 438 14
usbd_video.c 402 4

CherryUSB 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 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.

CherryUSB 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 CherryUSB 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

CherryUSB Documentation Tutorial

Quickly start, API manual,and Class knowledge and examples, see CherryUSB Documentation Tutorial

CherryUSB Video Tutorial

USB basic concepts and how the CherryUSB Device stack is implemented, see CherryUSB Device Stack Tutorial.