Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions host/usb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
[![Component Registry](https://components.espressif.com/components/espressif/usb/badge.svg)](https://components.espressif.com/components/espressif/usb)
![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)

This directory contains an implementation of a USB Host Library [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html).
This component contains an implementation of a [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html).

USB Host Library works underneath the USB Host Class drivers:
In a typical USB application, the USB Host Library works underneath the USB Host Class drivers:
- [CDC](../class/cdc/) Communication Device Class (ACM)
- [HID](../class/hid/usb_host_hid/) Human Interface Device
- [MSC](../class/msc/usb_host_msc/) Mass Storage Class
- [UAC](../class/uac/usb_host_uac/) USB Audio Class
- [UVC](../class/uvc/usb_host_uvc/) USB Video Class

## esp-idf compatibility

The USB Host Library is included in [esp-idf](https://github.com/espressif/esp-idf/tree/release/v5.5/components/usb) versions 5.x. Starting with version 6.0, it is no longer part of esp-idf and can only be used as a managed component.

### Bugfixes and new features
**Bugfixes** are backported to all active esp-idf 5.x releases branches. You can find the currently supported release branches [here](https://github.com/espressif/esp-idf?tab=readme-ov-file#esp-idf-release-support-schedule).

**New features** are added only to this component. However, backward compatibility is maintained for all esp-idf service-period branches. This means that users of active 5.x releases can override the version of the library bundled with esp-idf if they need features introduced after esp-idf version 6.0.

Comment thread
peter-marcisovsky marked this conversation as resolved.
## Usage

To include this component in your project:
Expand All @@ -38,7 +47,7 @@ dependencies:
#include "usb/usb_host.h"
```

3. Initialize the USB Host stack:
3. Initialize the USB Host Library. The library is a singleton, it must be initialized only once for all class drivers:
```c
usb_host_config_t host_config = {/* configuration */};
usb_host_install(&host_config);
Expand All @@ -56,9 +65,3 @@ Refer to following examples, using USB Host library from esp-idf:
- [MSC Host](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/msc)
- [USB Host Library](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/usb_host_lib)
- [UVC Host](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/uvc)

## Supported targets

- ESP32-S2
- ESP32-S3
- ESP32-P4
5 changes: 5 additions & 0 deletions host/usb/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
description: USB Host library
version: "1.0.1-rc0"
url: https://github.com/espressif/esp-usb/tree/master/host/usb
documentation: "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html"
issues: "https://github.com/espressif/esp-usb/issues"
repository: "https://github.com/espressif/esp-usb.git"
repository_info:
path: "host/usb"
dependencies:
idf: ">=5.4"
targets:
Expand Down
Loading