Hello,Community
I want to R/W a spi slave device on imx6q board.
Could someone tell me the difference between the following code A and B.
Code A:
---------------------------------------------
struct spi_ioc_transfer tr[2] = {
{
.tx_buf = (unsigned long)tbuf,
.len = bytes,
},
{
.rx_buf = (unsigned long)rbuf,
.len = bytes,
}
};
ret = ioctl(fd, SPI_IOC_MESSAGE(2), tr);
-------------------------------------------------
Code B:
---------------------------------------------
struct spi_ioc_transfer tr[1] = {
{
.tx_buf = (unsigned long)tbuf,
.rx_buf = (unsigned long)rbuf,
.len = bytes,
}
};
ret = ioctl(fd, SPI_IOC_MESSAGE(1), tr);
-------------------------------------------------
Thank you!
Best Regards!