non-blocking mode
pille opened this issue · comments
is it possible to provide a non-blocking mode, where the main program flow isn't interrupted?
i can imagine calling a debug-function, in the loop, that just checks the Serial buffer.
if it's filled, it interprets & acts on the commands it finds and returns to program flow.
maybe this could also being called using a timer.
I think you could use BREAK_IF(condition) for that. The condition could be as you describe a check of the input state or something else such a variable changed by a timer ISR.
but wouln't that still drop into a shell, breaking program flow, or do you mean to use a dummy condition, just that your handler code is called?
Consider BREAK_IF(DebugSerial.available() > 0) that would only drop into the shell when there is/are character(s) available for the shell.