Anyone know why the cs_change member of the spi_ioc_transfer struct doesn't 
do anything? I've tried setting it to 1 and 0, but neither value changes 
the behavior. CS always goes back high after ioctl returns. 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