LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   make the Slave select high and low alternately in Spi (http://www.linuxquestions.org/questions/programming-9/make-the-slave-select-high-and-low-alternately-in-spi-4175469856/)

zhangz64 07-16-2013 04:47 PM

make the Slave select high and low alternately in Spi
 
I have written a SPI driver using beagle board xM for SPI slave devices.Can anybody help me out
how to make chipselect high and low alternately to communicate with other.
SPI slave in user application.I am already using the same test application
spidev_test.c from SPI Documentation given by linux2.6.32.2

Thank you.

PTrenholme 07-19-2013 05:46 PM

Since you have, as yet, no replies, even though I've never used SPI, etc., as suggestion:

The spidev.h file defines SPI_CS_HI, so I'd guess you could do something like
Code:

mode &= ~SPI_CS_HI

zhangz64 07-19-2013 06:00 PM

Hi PTrenholme Thank you for you reply.

I configured a GPIO as a output to manually control the ss.

It works so far.

But i guess it has some disadvantages , like speed.


All times are GMT -5. The time now is 03:29 PM.