summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorc1570 <[email protected]>2025-09-25 01:01:01 +0200
committerc1570 <[email protected]>2025-10-20 21:07:06 +0200
commit75f2a8451e6ab622f8974b77b76b16ac2d057349 (patch)
tree3990917ebda4a5c3d7ad8d5b393f73fe1114ec70 /docs/tutorials
parente7b851d9ac2657e591f772dd3fa326e2d8d00270 (diff)
improve flow
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/first_device.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/tutorials/first_device.rst b/docs/tutorials/first_device.rst
index 9fac2df49..1b9ed5b0a 100644
--- a/docs/tutorials/first_device.rst
+++ b/docs/tutorials/first_device.rst
@@ -40,7 +40,7 @@ Key files in the example:
* ``usb_descriptors.c`` - USB device descriptors
* ``tusb_config.h`` - TinyUSB stack configuration
-**Main Loop Pattern**:
+The main loop follows a simple pattern that combines board initialization, TinyUSB initialization, and continuous task processing:
.. code-block:: c
@@ -54,11 +54,13 @@ Key files in the example:
}
}
-**Device Task**: ``tud_task()`` must be called regularly to handle USB events and maintain the connection.
+The ``tud_task()`` function must be called regularly to handle USB events and maintain the connection with the host. This function processes all queued USB events and triggers appropriate callbacks in your application code.
Step 3: Build and Test
======================
+With a clear understanding of the code structure, you're ready to build and test the example. This process involves fetching dependencies, compiling for your target board, and flashing the firmware:
+
.. code-block:: bash
# Fetch dependencies for your board family
@@ -78,6 +80,8 @@ Step 3: Build and Test
Step 4: Customize for Your Needs
=================================
+Once you have the basic example working, you can customize it for your specific application. The following modifications demonstrate common customization patterns.
+
**Simplify to CDC-only**:
1. In ``tusb_config.h``, disable MSC: