summaryrefslogtreecommitdiff
path: root/examples/dual/dynamic_switch/src/main.c
AgeCommit message (Collapse)Author
2026-06-01ultrareview nits: keep xfer_result table in sync, hoist blinky loophathach
- src/tusb.c: extend tu_str_xfer_result[] with "ABORTED" and "INVALID" to match the new enum size. Not reachable today (no HCD posts those values through hcd_event_xfer_complete), but keeps the enum/table invariant intact so future HCDs that surface ABORTED don't index OOB. - examples/dual/dynamic_switch/src/main.c: apply the same while(1) hoist already done for cdc_task / print_devinfo_task to led_blinking_task. On OS_NONE the loop returned mid-iteration, which on first call could fire multiple back-to-back toggles while start_ms (initially 0) caught up to uptime. Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-30dynamic_switch: hoist while(1) out for OS_NONEhathach
Sonar flagged the loop body as executing only once on OS_NONE because the OS_NONE branch returns inside the first iteration (main() drives the task again). Make the while(1) conditional on RTOS so the OS_NONE build is a straight-line function with no misleading loop. Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-28remove sync() in tinyusb callback since it cause issue with RTOS when usbh ↵hathach
task is blocking
2026-03-04replace board_millis() with tusb_time_millis_api() in dynamic_switch examplehathach
2026-02-27Add a dynamic switch exampleHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>