Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b24e865
doc: update tinyusb document to support esp32s3
suda-morris Jun 30, 2021
e18ea20
Add USB Host Library API docs
Dazza0 Aug 31, 2021
3a7f2a5
usb: Extend CDC device with second CDC channel
tore-espressif Dec 16, 2021
3e2ba4a
usb: Add USB Host Library documentation
Dazza0 Jan 6, 2022
5a5a326
Merge branch 'feature/usb_host_cleanup' into 'master'
Dazza0 Jan 6, 2022
d334dbb
docs: tinyusb: fix typo
ZenithalHourlyRate Feb 10, 2022
b1f7469
usb: Added MIDI example + fixed TinyUSB MIDI config
adokitkat Apr 12, 2022
d023df1
example: peripherals/usb: fix typo naming of local variables
esp-jiangguangming Jul 18, 2022
db90dfc
tinyusb: Add TinyUSB example tests
tore-espressif Jul 22, 2022
c11b266
usb: Bring USB Host API out of beta
tore-espressif Aug 9, 2022
cd8704e
usb_host: Use MSC driver from component registry
tore-espressif Aug 11, 2022
3dd00ba
tinyusb: Add VBUS voltage monitoring feature
tore-espressif Sep 22, 2022
946c1b7
tinyusb: Use TinyUSB from component registry
tore-espressif Oct 19, 2022
797a09f
updated USB_OTG in dfu.rst, usb_device.rst and secure-boot-v2.rst
Lindazhxy Sep 14, 2022
c5d7367
USB: Add MSC example.
esp-saurabhbansal Oct 31, 2022
8ee1838
Merge branch 'docs/update_USB-OTG_ESP32S2_ESP32S3' into 'master'
Lindazhxy Dec 27, 2022
043afdb
usb_host: Add maintainer's notes (Introduction and DWC_OTG Controller)
Dazza0 Dec 20, 2022
8a75a2f
USB Dev: Integrate sdcard as a storage media that is accessed by USB-…
esp-saurabhbansal Dec 19, 2022
06abbc4
Merge branch 'feature/usb_device_msc_sdcard' into 'master'
esp-saurabhbansal Jan 17, 2023
0fffc27
usb_host: Add maintainer's notes (Design, Architecture)
Dazza0 Jan 16, 2023
8b1d16b
usb: Update host CDC examples
tore-espressif Mar 19, 2023
6771a42
usb: modify example according to newly implemented usbd msc driver
esp-saurabhbansal Mar 13, 2023
4df2544
usb_host: Update docs and comments regarding first configuration enum…
Dazza0 Apr 17, 2023
2ed3414
Merge branch 'contrib/github_pr_11113' into 'master'
Dazza0 Apr 18, 2023
b15eef6
Docs: update CN translation for esp_http_client.rst, external-ram.rst…
esp-momo Apr 19, 2023
162a22f
Merge branch 'docs/update_cn_trans_api_guides' into 'master'
esp-momo Apr 19, 2023
458a901
usbd: add usb composite device example
esp-saurabhbansal Apr 10, 2023
9dffed8
Merge branch 'feature/usb_composite_device_support' into 'master'
esp-saurabhbansal Apr 25, 2023
b6e0a48
docs: add a command about how to add the tinyusb component as a depen…
Lindazhxy Aug 8, 2023
c8faed4
docs: update format issues for EN and CN files under api-reference/pe…
caixinying-git Jul 27, 2023
d85933a
docs: provide CN translation for api-reference/peripherals/usb_host.rst
caixinying-git Aug 9, 2023
ebbff5f
docs: update format issues left in EN docs
caixinying-git Sep 13, 2023
d61e689
Merge branch 'docs/add_Chinese_translation_for_api-reference/peripher…
caixinying-git Sep 19, 2023
31629c2
docs: update document format issues
caixinying-git Oct 13, 2023
9c668d9
feat(docs): added USB Host Stack Configuration description
roma-jam Oct 19, 2023
a54b0c8
Docs: Update Chinese translation for usb_host.rst
esp-momo Nov 15, 2023
0a905e0
docs(sphinx-lint): Fix issues reported by sphinx-lint before adding i…
f-hollow Jan 19, 2024
a1f38eb
feat(docs): added usb host enumeration filter description
peter-marcisovsky Jan 3, 2024
9efc5d1
docs: provide CN translation for api-reference/peripherals/usb_device…
caixinying-git Jul 14, 2023
81158d7
docs(usb_device): Added HighSpeed description for tinyusb config stru…
roma-jam Mar 22, 2024
63586a1
docs: Provide translation for usb_host_notes_index.rst in api-reference
Mar 27, 2024
46014d9
docs: Edit the CN Translation and EN Source of usb-host
Apr 3, 2024
32ea4c7
Merge branch 'docs/translate_usb_host_notes_index' into 'master'
Shen7436 Apr 9, 2024
3853c81
docs(usb): Add USBH maintainer notes
Dazza0 Apr 16, 2024
b1b9ca5
docs: Provide translation for jpeg&override_driver&arch in peripherals
Apr 7, 2024
a0ab25c
docs: Provide translation for usb_host_notes_design
May 9, 2024
144d6e8
docs: update cn trans for use-device.rst
esp-momo May 16, 2024
563d6d8
docs(enum): Added description for Enumeration process (Enum Driver)
roma-jam May 23, 2024
ef38486
docs(ext_hub): Added description for External Hub Driver
roma-jam May 23, 2024
ea8d40c
docs: Provide translation for usb_host_notes_dwc_otg
Shen7436 May 31, 2024
7e1945d
Merge branch 'docs/translate_dwc_otg' into 'master'
Shen7436 Jul 8, 2024
2fa0a55
docs: Consistent naming convention for ESP Component Registry
XDanielPaul May 30, 2024
8544925
docs: Consistent naming convention in CN translation
Shen7436 Jul 19, 2024
0366924
docs: Provide CN translation for camera_driver.rst
Shen7436 Jul 26, 2024
65f8549
Merge branch 'docs/translate_camera_driver' into 'master'
Shen7436 Aug 1, 2024
c836894
docs(usb/host): Update maintainer docs for ESP32-P4
tore-espressif Aug 13, 2024
1ef624f
docs(usb/device): Update USB device docs for ESP32-P4
tore-espressif Aug 15, 2024
82020e6
docs(usb/host): Update USB host docs for ESP32-P4
tore-espressif Aug 15, 2024
1f80738
docs: Add or update application examples for usb_host and usb_device
April-Yjj Sep 3, 2024
57b625f
docs(ext_port): Added maintainers notes for External Port Driver
roma-jam May 23, 2024
d09b234
fix(usb_host): Fixing dererence to OTG_NUM_HOST_CHAN in docs
peter-marcisovsky Feb 20, 2025
4c2e4e3
docs(usb_host): Removed the limitation for Low-speed device connected…
roma-jam Feb 21, 2025
64d22d7
Merge branch 'fix/usb_host_docs_host_num_chan_reference' into 'master'
peter-marcisovsky Feb 28, 2025
7555aee
docs(usb_msc): Update documentation with performance optimization res…
igi540 Feb 12, 2025
24ac544
docs: Provide CN translation for usb device
0cici Apr 14, 2025
3b58ef9
refactor(usb/host): Update UVC example for new UVC driver v2.0
tore-espressif Apr 10, 2025
acc9b89
Update CN translation
April-Yjj Apr 17, 2025
d59a9c2
feat(usb/host): Add option to choose peripheral for USB host library
tore-espressif Dec 3, 2024
2b63af5
docs: Update CN for usb_host.rst
0cici May 8, 2025
95dc5df
docs(usb): add section on external USB PHY configuration
igi540 Jul 17, 2025
d1577f0
docs: Add CN translation to usb_host and usb_device.rst
April-Yjj Aug 12, 2025
2a6a622
docs(usb): add TUSB1106 to tested external PHY list
igi540 Sep 11, 2025
ba7f5a6
refactor(usb_host): Remove usb component form esp-idf
peter-marcisovsky Sep 2, 2025
cce07a9
docs: Update CN translation
Shen7436 Oct 10, 2025
85d81b7
docs(usb): add ESP32-H4 support notes and pin map
igi540 Oct 19, 2025
52bb7c3
docs: Update CN translation
April-Yjj Nov 4, 2025
390c347
feat(usb_host): Add documentation about usb host suspend, resume
peter-marcisovsky Oct 1, 2025
7b9237c
docs: Update CN translation for usb_host.rst
April-Yjj Nov 27, 2025
c04db58
docs: Add original documentation files from esp-idf
tore-espressif Dec 5, 2025
57d9bb0
docs: Sphinx documentation setup and deployment
tore-espressif Dec 5, 2025
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
92 changes: 92 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build and Deploy Documentation

on:
# Build preview documentation for pull requests
pull_request:
# Build and deploy documentation for master branch
push:
branches:
- master

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Install Python dependencies
working-directory: docs
run: |
pip install -r requirements.txt

- name: Build documentation
working-directory: docs
run: |
chmod +x build_docs.sh
./build_docs.sh

- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: |
docs/_build
!docs/_build/.doctrees

deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
# Set Deploy environment for master branch, otherwise set Preview environment
environment: ${{ github.ref_name == 'master' && 'esp-docs deploy' || 'esp-docs preview' }}
steps:
- uses: actions/checkout@v5

- uses: actions/download-artifact@v4
with:
name: docs
path: docs/_build

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Python dependencies
working-directory: docs
run: |
pip install -r requirements.txt

- name: Get git version
id: git_version
run: |
git_ver=$(git describe --always)
echo "version=$git_ver" >> $GITHUB_OUTPUT
echo "GIT_VER=$git_ver" >> $GITHUB_ENV

- name: Deploy documentation
working-directory: docs
shell: bash
env:
GIT_VER: ${{ steps.git_version.outputs.version }}
DOCS_BUILD_DIR: ${{ github.workspace }}/docs/_build
DOCS_DEPLOY_URL_BASE: ${{ vars.DOCS_URL_BASE }}
DOCS_DEPLOY_SERVER: ${{ vars.DOCS_SERVER }}
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_SERVER_USER }}
DOCS_DEPLOY_PATH: ${{ vars.DOCS_PATH }}
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PRIVATEKEY }}
# TYPE is optional - only used for output formatting (shows "deploy" or "preview" in logs)
TYPE: ${{ github.ref_name == 'master' && 'deploy' || 'preview' }}
run: |
source $GITHUB_WORKSPACE/docs/utils.sh
add_doc_server_ssh_keys "$DOCS_DEPLOY_PRIVATEKEY" "$DOCS_DEPLOY_SERVER" "$DOCS_DEPLOY_SERVER_USER"
deploy-docs
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ sdkconfig.old
dependencies.lock
**/managed_components/**
.vscode/
doxygen/
warnings.txt
docs/_build/**
**/TODO
**/venv/**
52 changes: 52 additions & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0

# Doxygen configuration for ESP-USB API documentation

PROJECT_NAME = "ESP-USB"
PROJECT_BRIEF = "ESP-IDF USB Host and Device Drivers"

## The 'INPUT' statement below is used as input by script 'gen-df-input.py'
## to automatically generate API reference list files header_file.inc
## These files are placed in '_inc' directory
## and used to include in API reference documentation
INPUT = \
$(PROJECT_PATH)/host/usb/include/usb/usb_host.h \
$(PROJECT_PATH)/host/usb/include/usb/usb_helpers.h \
$(PROJECT_PATH)/host/usb/include/usb/usb_types_stack.h \
$(PROJECT_PATH)/host/usb/include/usb/usb_types_ch9.h \
$(PROJECT_PATH)/host/usb/include/usb/usb_types_ch11.h \
$(PROJECT_PATH)/device/esp_tinyusb/include/tinyusb.h

WARN_NO_PARAMDOC = YES

## Enable preprocessing and remove __attribute__(...) expressions from the INPUT files
##
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = \
$(ENV_DOXYGEN_DEFINES) \
__DOXYGEN__=1 \
__attribute__(x)= \
ESP_STATIC_ASSERT()=

## Do not complain about not having dot
##
HAVE_DOT = NO

## Generate XML that is required for Breathe
##
GENERATE_XML = YES
XML_OUTPUT = xml

GENERATE_HTML = NO
HAVE_DOT = NO
GENERATE_LATEX = NO
GENERATE_MAN = YES
GENERATE_RTF = NO

## Skip distracting progress messages
##
QUIET = YES
50 changes: 50 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ESP-USB Documentation

This folder contains the ESP-Docs scaffolding for ESP-USB documentation.

## Structure

- `conf_common.py` - Common configuration for all languages
- `en/` - English documentation source files
- `conf.py` - English-specific configuration
- `index.rst` - Main documentation index
- `_static/` - Static files (CSS, JS, images)
- `docs_version.js` - Target and version selector configuration
- `Doxyfile` - Doxygen configuration file
- `requirements.txt` - Python dependencies for building documentation
- `build_docs.sh` - Build script for documentation

## Building Documentation

### Prerequisites

1. **Python 3.7 or newer**
2. **Doxygen** - Install via system package manager:
- Ubuntu/Debian: `sudo apt-get install doxygen graphviz`
- macOS: `brew install doxygen graphviz`
- Windows: Download from [Doxygen website](https://www.doxygen.nl/download.html)

### Build Steps

To build the documentation locally:

```bash
cd docs
pip install -r requirements.txt
./build_docs.sh
```

The built documentation will be in `docs/_build/`.

## Adding Documentation Content

1. Add reStructuredText (`.rst`) files to `docs/en/`
2. Update `docs/en/index.rst` to include new pages in the table of contents
3. For API documentation, ensure header files are included in `Doxyfile` INPUT paths

## Existing Documentation

The following folders contain existing markdown documentation that can be migrated to reStructuredText format:

- `device/` - Device-related documentation
- `host/` - Host-related documentation
15 changes: 15 additions & 0 deletions docs/_static/docs_version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
//
// SPDX-License-Identifier: Apache-2.0

var DOCUMENTATION_VERSIONS = {
DEFAULTS: { has_targets: true,
supported_targets: [ "esp32s2", "esp32s3", "esp32p4", "esp32h4" ]
},
IDF_TARGETS: [
{ text: "ESP32-S2", value: "esp32s2" },
{ text: "ESP32-S3", value: "esp32s3" },
{ text: "ESP32-P4", value: "esp32p4" },
{ text: "ESP32-H4", value: "esp32h4" }
]
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_device/usb-board-connection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_device/usb_fs_phy_sp5301.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/dwc-otg-operation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/dwc-otg-scatter-gather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/poweron-timings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/stack-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/usb_host_lib_entities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/usb_host/usb_host_lib_lifecycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
#
build-docs --project-path .. -t esp32s2 esp32s3 esp32p4 esp32h4
41 changes: 41 additions & 0 deletions docs/conf_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
#
# SPDX-License-Identifier: Apache-2.0

"""
Common configuration for ESP-USB documentation
"""

from esp_docs.conf_docs import * # noqa: F403,F401


extensions += [ # Needed as a trigger for running doxygen
'esp_docs.esp_extensions.dummy_build_system',
'esp_docs.esp_extensions.run_doxygen',
]
# Languages supported
languages = ['en', 'zh_CN']

# Project targets (used as URL slugs)
idf_targets = ['esp32s2', 'esp32s3', 'esp32p4', 'esp32h4']

# GitHub repository information
github_repo = 'espressif/esp-usb'
project_homepage = 'https://github.com/espressif/esp-usb'

# Initialize html_context if not already defined
html_context = {}
html_context['github_user'] = 'espressif'
html_context['github_repo'] = 'esp-usb'

# Static files path
html_static_path = ['../_static']

# Project slug for URL
project_slug = 'esp-usb'

# Versions URL (relative to HTML root)
versions_url = '_static/docs_version.js'

# PDF file prefix
pdf_file_prefix = u'esp-usb'
37 changes: 37 additions & 0 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
# -*- coding: utf-8 -*-
#
# English Language RTD & Sphinx config file
#
# Uses ../conf_common.py for most non-language-specific settings.

# Importing conf_common adds all the non-language-specific
# parts to this conf module

try:
from conf_common import * # noqa: F403,F401
except ImportError:
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
from conf_common import * # noqa: F403,F401

import datetime

current_year = datetime.datetime.now().year
start_year = 2025

if current_year == start_year:
copyright = '{}, Espressif Systems (Shanghai) Co., Ltd'.format(start_year)
else:
copyright = '{} - {}, Espressif Systems (Shanghai) Co., Ltd'.format(start_year, current_year)

# General information about the project.
project = u'ESP-USB Programming Guide'
author = u'Espressif Systems'
pdf_title = u'ESP-USB Programming Guide'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'
16 changes: 16 additions & 0 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ESP-USB Programming Guide
==========================

Welcome to the ESP-USB Programming Guide.

.. toctree::
:maxdepth: 2
:caption: Contents:

introduction

.. toctree::
:maxdepth: 1

usb_host
usb_device
13 changes: 13 additions & 0 deletions docs/en/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Introduction
============

ESP-USB is a repository containing ESP-IDF USB host and device class drivers
which have been separated and uploaded into IDF Component Manager.

This documentation will be expanded with detailed information about:

* USB Host Library
* USB Device Drivers
* USB Class Drivers (CDC, HID, MSC, UAC, UVC)
* API Reference
* Examples and Usage
Loading
Loading