4 ms·
Well, it's behavior specific to one board, and perhaps to TinyUSB. But it looks like Arduino has a yield function [1] that you can use to run periodic tasks if
by skybrian 4y ago
Well, it's behavior specific to one board, and perhaps to TinyUSB. But it looks like Arduino has a yield function [1] that you can use to run periodic tasks if you write your own loop. And Teensy calls yield() between calls to loop(). [2]
Since switching to VSCode and PlatformIO, I read the source more. (Arduino 1.x discouraged this due to not having easy ways to navigate between callers and callees.)
[1] https://www.arduino.cc/reference/en/libraries/scheduler/yield/ https://www.arduino.cc/reference/en/libraries/scheduler/yiel...
[2] https://github.com/PaulStoffregen/cores/blob/master/teensy4/main.cpp#L51 https://github.com/PaulStoffregen/cores/blob/master/teensy4/...