tud_task() should provide a way to indicate if it did anything #2930
ReimuNotMoe
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm attempting to make my firmware fully tickless, which means, the CPU will go to sleep when nothing can be done and only the peripheral interrupts can wake it up.
In this way, each task in the main loop must indicate if they did anything in the current loop invocation. Now I have to modify
tud_task()
to make it indicate it's busy when it received something from the queue.So IMO it's better to provide a standardized API to let the TinyUSB stack report its busy status. Such a mechanism is also mandatory when using TinyUSB on Linux (using
/dev/mem
or UIO) because a non-stopwhile (1)
loop will eat up all the CPU.Beta Was this translation helpful? Give feedback.
All reactions