Hello, I am going over this example here: infocenter.nordicsemi.com/index.jsp
I am a bit confused how this works. My intention is to create a slave, so a master can send different commands (e.g. command indicating that a data transfer is to follow, a query command where the slave returns data, etc.). The slave needs to be performing tasks in the meantime.
So if the master sends a command, how would I then compare it, and then send the corresponding data back? It seems like this library is set up for a direct exchange of data? Would I just take a look at the m_rx_buff after the spis_xfer_done flag was set, then prepare the m_tx_buf with the corresponding command data to send back? I also see a function called memset() and couldn't figure out how this is supposed to work.
What is the best way to perform other tasks while the slave is waiting for commands followed by data xfer?
Thanks and any help/advice is greatly appreciated.