callbacks for SPI/UART?
-
Hi folks!
I am starting a project and already made some progress with my software. I am using SPI and UART (among other stuff).
HardwareSerial provides an OnReceiveCallback. Good. But what about Transmitting? HardwareSerial.Write transmits data. Or better, it buffers it in the background and transmits it. When will this be finished? How can I detect an ongoing/finished transmission? Why is there no OnTransmitFinishedCallback?
Similar with SPI:
this enables CS line, transmits data and disables CS line.

But this is blocking. Even if SPI frequencies are high and such transmissions are only taking a few 100microseconds. Why is this not done similiar like UART with background transmission and OnReceivedCallback or similar?
In HardwareSerial I was able to find this OnReceiveCallback after digging a lot in the provided libs. But what about SPI?