Overview of CherryUSB
masterCherryUSB is a lightweight, portable USB host and device protocol stack designed for embedded systems. It is structured to be easy to learn, easy to use, and capable of high performance.
Key Features
Easy to Learn
- Streamlined Logic: Simple code with minimal complex C syntax.
- Layered Architecture: Tree-structured programming with progressive layers.
- Simplified Drivers: Templated Class and porting drivers.
- Clear API Categorization:
- Device Stack: Focuses on initialization, class registration, command callbacks, and data transmission.
- Host Stack: Focuses on initialization, class discovery, and data transmission.
Easy to Use
- Familiar Interface: Data transmission is designed to feel similar to UART TX/RX DMA.
- No Packetization Management: Users can transmit or receive data without length restrictions; the porting drivers handle USB packetization automatically.
High Performance
- Direct Register Access: Porting drivers interface directly with hardware registers without heavy abstraction layers.
- Zero Copy: Supports memory zero-copy mechanisms.
- DMA Integration: Utilizes DMA modes when the USB IP supports it to maximize hardware bandwidth and handle packetization in the interrupt context.