diff options
| author | c1570 <[email protected]> | 2025-09-25 01:01:01 +0200 |
|---|---|---|
| committer | c1570 <[email protected]> | 2025-10-20 21:07:06 +0200 |
| commit | 75f2a8451e6ab622f8974b77b76b16ac2d057349 (patch) | |
| tree | 3990917ebda4a5c3d7ad8d5b393f73fe1114ec70 /docs/reference | |
| parent | e7b851d9ac2657e591f772dd3fa326e2d8d00270 (diff) | |
improve flow
Diffstat (limited to 'docs/reference')
| -rw-r--r-- | docs/reference/configuration.rst | 14 | ||||
| -rw-r--r-- | docs/reference/usb_classes.rst | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/docs/reference/configuration.rst b/docs/reference/configuration.rst index 79aeb15d8..fa0a874f5 100644 --- a/docs/reference/configuration.rst +++ b/docs/reference/configuration.rst @@ -173,15 +173,21 @@ Memory Management RTOS Configuration ------------------ -**FreeRTOS**: +TinyUSB supports multiple operating systems through its OSAL (Operating System Abstraction Layer). Choose the appropriate configuration based on your target environment. + +**FreeRTOS Integration**: + +When using FreeRTOS, configure the task queue sizes to handle USB events efficiently: .. code-block:: c #define CFG_TUSB_OS OPT_OS_FREERTOS - #define CFG_TUD_TASK_QUEUE_SZ 16 - #define CFG_TUH_TASK_QUEUE_SZ 16 + #define CFG_TUD_TASK_QUEUE_SZ 16 // Device task queue size + #define CFG_TUH_TASK_QUEUE_SZ 16 // Host task queue size + +**RT-Thread Integration**: -**RT-Thread**: +RT-Thread requires only the OS selection, as it uses the RTOS's built-in primitives: .. code-block:: c diff --git a/docs/reference/usb_classes.rst b/docs/reference/usb_classes.rst index 00a251ffb..387587b48 100644 --- a/docs/reference/usb_classes.rst +++ b/docs/reference/usb_classes.rst @@ -268,10 +268,7 @@ Most classes require callback functions: Performance Considerations -------------------------- -- **Buffer Sizes**: Match endpoint buffer sizes to expected data rates -- **Transfer Types**: Use appropriate USB transfer types (bulk, interrupt, isochronous) -- **CPU Usage**: Minimize processing in interrupt context -- **Memory Usage**: Static allocation only, no dynamic memory +When implementing USB classes, match **buffer sizes** to expected data rates to avoid bottlenecks. Choose appropriate **transfer types** based on your application's requirements. Keep **callback processing** lightweight for optimal performance. Avoid **memory allocations in critical paths** where possible to maintain consistent performance. Testing and Validation ---------------------- |
