Cosa: An Object-Oriented Platform for Arduino programming

g_ad:
I can see new shell function "execute_P", I believe it is taking the input from the prog mem instead of the buffer? I didn't find it in the online documentation.

@g_ad

That one is easy; my dropbox has not yet synced the latest update. But it should be ready now.

g_ad:
Could you please tell me one more small thing that I didn't find the answer for yet - how to understand the uart blocking and non blocking "uart.set_blocking(SLEEP_MODE_IDLE)" what does it actually do?

The issue is what should uart.gets() do when there is no more characters in the input buffer. The non-blocking behavior is to return directly with what was available. That would require building up the command line until the new-line character is seen.

The set_blocking() tells the device to wait for more characters and return when it receives the new-line. The function gets() will call yield() while waiting for more character. And the actual sleep mode is defined by the implementation of yield(). There are two major implementations of yield(). One that uses power down and the second that does context switches.

Links down the rabbit hole.

https://github.com/mikaelpatel/Cosa/blob/master/cores/cosa/Cosa/Nucleo/Thread.cpp#L31

Cheers!