pyRTOS icon indicating copy to clipboard operation
pyRTOS copied to clipboard

Add more I/O blocking conditions

Open Rybec opened this issue 3 years ago • 0 comments

Currently users who want slow, hardware managed I/O to block, so other tasks can run, have to write their own blocking conditions. Very common types of I/O should have blocking conditions built into pyRTOS.

I need to look into how CircuitPython handles things like I2C and SPI. If they use similar APIs, it might be possible to make a single condition that works for both.

What other kinds of I/O would benefit from blocking conditions? LCD and Matrix display rendering? Do the APIs for those provide any way of checking whether a rendering operation has finished? If not, how hard would it be to add that?

These are the kinds of I/O I am aware of that might benefit from this:

  • SPI
  • I2C
  • UART
  • I2S
  • SDIO

Would higher level communication, like rendering, be included in the lower level stuff above, or would it require its own blocking conditions? If it requires its own blocking conditions, perhaps this issue should be limited to low level I/O and we should have a separate issue for higher level I/O.

Rybec avatar Jun 04 '21 19:06 Rybec