TsctlSPIReadWriteDesc

From embeddedTS Manuals

This function initiates a transaction on the SPI bus. The bytes in the Array wbuf for the length of the Array are written to the SPI bus during the transaction, and the bytes in rbuf for the same length are filled in with bytes read from the SPI bus during the same transaction. The chip select line to be asserted is specified by adrs. If the value of adrs is negative, the chip select line will not be de-asserted at the end of the readwrite and -adrs is used as address; if adrs is positive then the chip select will be de-asserted at the end of the read/write. An adrs of 1 corresponds to CS0, an adrs of 2 corresponds to CS1, etc.

A positive value is returned on success, and a negative value on failure.