Is anyone else having issues with the cs_change member of the 
spi_ioc_transfer struct no doing anything? I've tried setting it to both 1 
and 0, but the behavior is always the same with CS being deasserted after 
returning from ioctl. Here is my code:

static int8_t spiTransfer(const uint8_t* const send, uint8_t* const receive, 
uint16_t length, bool deAssertCS) {
  struct spi_ioc_transfer transfer;          //the transfer structure
  transfer.tx_buf = (unsigned long) send;    //the buffer for sending data
  transfer.rx_buf = (unsigned long) receive; //the buffer for receiving data
  transfer.len = length;                     //the length of buffer
  transfer.speed_hz = speed;                 //the speed in Hz
  transfer.bits_per_word = bits;             //bits per word
  transfer.delay_usecs = 0;                  //delay in us
  transfer.cs_change = deAssertCS;


  int8_t status = ioctl(fd, SPI_IOC_MESSAGE(1), &transfer);
  if (status < 0) {
    perror("SPI: SPI_IOC_MESSAGE failed");
  }

  return status;
}

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to