Have you try setting GPIO direction to out before writing to it???<br>give a shot.<br><br>follow: <a href="http://sites.google.com/site/bifferboard/Home/gpio">http://sites.google.com/site/bifferboard/Home/gpio</a><br><br><br>
<br><div class="gmail_quote">On Fri, Mar 11, 2011 at 4:04 PM, Alexandru Caramida <span dir="ltr"><<a href="mailto:alexandruc1723@yahoo.com">alexandruc1723@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div style="font-family: 'times new roman','new york',times,serif; font-size: 12pt;"><div>Hello everyone,</div><div><br></div><div>I am trying to emulate an SPI interface using four GPIO pins. This is a desktop computer with linux 2.6.28 kernel.</div>
<div><br></div><div>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</div><div>is enable the respectiv pin using </div><div><br>
</div><div>echo N > /sys/class/gpio/export</div><div><br></div><div>And I would get a gpioN directory </div><div><br></div><div>But I always get: "write error : invalid argument."</div><div><br></div><div>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.</div><div><br></div><div>Please help,</div><div><br></div><div><br></div><div></div>
</div><br>
</div><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br>