Hello, this should do it:
param = SPI_PUSHR_PCS(1 << 1);
ioctl (spi_fd, IO_IOCTL_SPI_SET_CS, ¶m);
The parameter type of this IOCTL command always corresponds to the one in the BSP SPI init structure (init_spi.c).
Regards,
PetrM
Thank you very much.
It works but my problem now is that I can't unset CS. I tried with:
param = SPI_PUSHR_PCS(1 << 1);
ioctl (spifd, IO_IOCTL_SPI_FLUSH_DEASSERT_CS, ¶m);
but it doesn't work. Any suggestions?
Regards,
Belén.