Hi, I want to know how to properly indicate for the function
spi_send_recv(...)
that I'm sending or receiving data on SPI.
On other platforms with library function/SDK, it's done by setting unused buffer to NULL. For example if I want to send data then the receiving buffer of the function is set to NULL and vice versa.
But with this function, I can't seem to do that, if I set for example the receiving buffer to NULL when trying to send certain data the program freeze and crash into error handling.
How to do that? Am I doing it right by setting unused buffer to zero but messed up somewhere else which caused the program to crash (which it isn't supposed to)?
Also, a side note: I did not use the event handler for SPI, in other words, at initialization and configuration phase, I set the event handler for SPI to NULL, which could be problematic.