summaryrefslogtreecommitdiff
path: root/docs/reference/architecture.rst
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-11 10:27:47 +0700
committerhathach <[email protected]>2025-11-11 10:53:39 +0700
commita1ae5b20ccf760282538dd81b9290527757fa9c7 (patch)
treea533fccebf77b046bbd6002f9bb077d98a9df6c3 /docs/reference/architecture.rst
parent6364a4df7a6e3a2b3583fe11a88665f06d18628b (diff)
update doc
Diffstat (limited to 'docs/reference/architecture.rst')
-rw-r--r--docs/reference/architecture.rst39
1 files changed, 13 insertions, 26 deletions
diff --git a/docs/reference/architecture.rst b/docs/reference/architecture.rst
index 8e4c6890e..70ea17ed4 100644
--- a/docs/reference/architecture.rst
+++ b/docs/reference/architecture.rst
@@ -42,36 +42,23 @@ Layer Structure
TinyUSB follows a layered architecture from hardware to application:
-.. code-block:: none
+.. figure:: ../assets/stack.svg
+ :width: 500px
+ :align: left
+ :alt: stackup
+
+.. raw:: html
- ┌─────────────────────────────────────────┐
- │ Application Layer │ ← Your code
- ├─────────────────────────────────────────┤
- │ USB Class Drivers │ ← CDC, HID, MSC, etc.
- ├─────────────────────────────────────────┤
- │ Device/Host Stack Core │ ← USB protocol handling
- ├─────────────────────────────────────────┤
- │ Hardware Abstraction (DCD/HCD) │ ← MCU-specific drivers
- ├─────────────────────────────────────────┤
- │ OS Abstraction (OSAL) │ ← RTOS integration
- ├─────────────────────────────────────────┤
- │ Common Utilities & FIFO │ ← Shared components
- └─────────────────────────────────────────┘
+ <div class="clear-both"></div>
Component Overview
------------------
-**Application Layer**: Your main application code that uses TinyUSB APIs.
-
-**Class Drivers**: Implement specific USB device classes (CDC, HID, MSC, etc.) and handle class-specific requests.
-
-**Device/Host Core**: Implements USB protocol state machines, endpoint management, and core USB functionality.
-
-**Hardware Abstraction**: MCU-specific code that interfaces with USB peripheral hardware.
-
-**OS Abstraction**: Provides threading primitives and synchronization for different RTOS environments.
-
-**Common Utilities**: Shared code including FIFO implementations, binary helpers, and utility functions.
+- **Application Layer**: Your main application code that uses TinyUSB APIs.
+- **Class Drivers**: Implement specific USB device classes (CDC, HID, MSC, etc.) and handle class-specific requests.
+- **Device/Host Core**: Implements USB protocol state machines, endpoint management, and core USB functionality.
+- **OS Abstraction**: Provides threading primitives and synchronization for different RTOS environments.
+- **Device/Host Controller Driver**: drivers that interface with MCU USB peripherals. Several MCUs may share a common driver.
Device Stack Architecture
=========================
@@ -85,7 +72,7 @@ Core Components
- MCU-specific USB device peripheral driver
- Handles endpoint configuration and data transfers
- Abstracts hardware differences between MCU families
-- Located in ``src/portable/VENDOR/FAMILY/``
+- Located in ``src/portable/VENDOR/USBIP/``
**USB Device Core (USBD)**:
- Implements USB device state machine