[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sync serial interface as SPI



Title: Mensaje

Hello Ken:
 
I found a post from Adam Felson who said this:
"I also disabled DMA but the DOUT (/rts1) on the dev.board was always high then and did not change when writing to the port."
So maybe the solution to your problem is only enabling DMA.
You could find that post in http://mhonarc.axis.se/dev-etrax/msg00816.html
 
 
Well I am also trying to use SPI but my program hangs when I call 'ioctl' like Adam Felson did: "ioctl (devspi, SSP_SPI, MASTER_BIDIR);"
Here is a piece of my code:
devspi = open ("/dev/syncser0", O_RDWR);
if (devspi == -1)
{
   exit (1);
}
ioctl (devspi, SSP_SPI, MASTER_BIDIR); // HERE MY PROGRAM HANGS
 
Do you know why I can't call 'ioctl' with success?
How do you call 'ioctl' and 'open' to use SPI?
 
Thank you, regards,
Carlos