From mboxrd@z Thu Jan 1 00:00:00 1970 From: vic.lix10@gmail.com (Vic) Date: Fri, 11 Mar 2011 08:31:54 -0800 Subject: SPI over GPIO In-Reply-To: References: <344296.43554.qm@web56301.mail.re3.yahoo.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Try setting 3 Pins as Out (Clk, CS, MOSI (MasterDataOUT)) and 1 as IN for MISO (MasterDataIn) On Fri, Mar 11, 2011 at 3:08 AM, Kaustubh Ashtekar wrote: > Please paste the full log of what you typed on the console and also > paste output of: > > strace > > On Fri, Mar 11, 2011 at 4:04 PM, Alexandru Caramida > wrote: >> Hello everyone, >> I am trying to emulate an SPI interface using four GPIO pins. This is a >> desktop computer with linux 2.6.28 kernel. >> The problem is I don't know if the pins are working. I read that if I have >> the sysfs support for the kernel (which I do :D) all I have to do >> is enable the respectiv pin using >> echo N > /sys/class/gpio/export >> And I would get a gpioN directory >> But I always get: "write error : invalid argument." >> Is there some other option i need to enable first? The people I am working >> with assured me that these pins are not used by any other device and they >> haven't found anything to suggest that they were turned off manualy. >> Please help, >> >> >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >