Couple of random cleanup patches following async PR#3566
Merged
HiFiPhile merged 6 commits intohathach:masterfrom Mar 29, 2026
Merged
Couple of random cleanup patches following async PR#3566HiFiPhile merged 6 commits intohathach:masterfrom
HiFiPhile merged 6 commits intohathach:masterfrom
Conversation
Size Difference ReportBecause TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds. Note: If there is no change, only one value is shown. Changes >1% in sizeNo entries. Changes <1% in size
No changes
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies a small set of correctness fixes and simplifications following an earlier async-related change set, touching both host and device task scheduling behavior and cleaning up an unused OS configuration macro.
Changes:
- Remove an unused OS scheduler capability macro from common configuration options.
- Adjust USB host deferred-callback scheduling and ensure
tuh_task_event_ready()considers deferred callbacks and deferred hub attachments appropriately. - Simplify the USB device task loop to avoid blocking on subsequent iterations by forcing follow-up receives to be non-blocking.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/tusb_option.h |
Removes the (apparently unused) CFG_TUSB_OS_HAS_SCHEDULER default definition. |
src/host/usbh.c |
Tweaks deferred callback timing (+1ms) and refines tuh_task_event_ready() logic for deferred work. |
src/device/usbd.c |
Changes tud_task_ext() to set timeout_ms = 0 after one event to allow returning once the queue is drained. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
|
| target | .text | .rodata | .data | .bss | total | % diff |
|---|---|---|---|---|---|---|
| da14695_dk_usb/net_lwip_webserver | — | — | — | — | 8 → 46,824 (+46,816) | +585200.0% |
| nutiny_sdk_nuc120/video_capture_2ch | — | — | — | — | 8 → 39,252 (+39,244) | +490550.0% |
| nutiny_nuc126v/video_capture_2ch | — | — | — | — | 8 → 38,676 (+38,668) | +483350.0% |
| nutiny_sdk_nuc120/cdc_msc_freertos | — | — | — | — | 8 → 27,744 (+27,736) | +346700.0% |
| nutiny_sdk_nuc120/msc_dual_lun | — | — | — | — | 8 → 27,232 (+27,224) | +340300.0% |
| nutiny_sdk_nuc121/msc_dual_lun | — | — | — | — | 8 → 26,660 (+26,652) | +333150.0% |
| nutiny_sdk_nuc120/audio_4_channel_mic_freertos | — | — | — | — | 8 → 25,992 (+25,984) | +324800.0% |
| nutiny_nuc126v/audio_4_channel_mic_freertos | — | — | — | — | 8 → 25,396 (+25,388) | +317350.0% |
| nutiny_sdk_nuc120/dynamic_configuration | — | — | — | — | 8 → 22,876 (+22,868) | +285850.0% |
| nutiny_sdk_nuc121/dynamic_configuration | — | — | — | — | 8 → 22,300 (+22,292) | +278650.0% |
Collaborator
|
Thank you, I've added |
HiFiPhile
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first 3 patches are fixes for small correctness issues.
The last 2 patches are simplifications.