I’d like to use an event-driven approach in my embedded application.
To make it work correctly, the peripheral drivers should be non-blocking. In other words: if they are sending and receiving data over I2C or SPI, they should use the
spi.transfer function which is non-blocking and uses a callback to signal that the transfer is complete and not the blocking
i2c.write functions .
However, all drivers for the peripherals I’m looking at are blocking.
Are there examples of drivers that use the non-blocking I2C or SPI api?