From: Holly G. <hgates@EINK.com> - 2006-02-01 16:07:39
|
Part of the thinspace project, which is the open source code that goes into the E Ink AM-100 developers kit, has a simple C program to read four button connected GPIOs on a gumstix. You can download the code from: http://sourceforge.net/projects/thinspace then look in thinspace/display_tools at get_button.h and get_button.c The program works by linking to pxaregs and mmapping the addresses of the appropriate GPIO registers. There is also apollo.c, which uses a similar method to construct the interface to the display controller, but the button code is simpler and less convolved with other stuff. -Holly Jean-Francois Richard wrote: >Hi Kevin, > >I don't know if this could be any use to you, but I made a test to >access the GPIO registers using the memory mapping method. You can find >it here: http://www.realfafard.com/fafard/index.php?id=31 > >Jean-Francois > > >On Tue, 2006-01-31 at 21:21 -0800, Kevin Worth wrote: > > >>I have looked through the Intel PXA255 Developer's Manual and I >>understand most of the information about GPIO's, but what I'm trying >>to figure out is how I actually implement something in code. >> >>Is there a particular header file I can use to get information from, >>like how to write to/read from a certain address? What about the >>/proc/gpio stuff? Is that slower or not as C-friendly? >> >>If anyone has or is able to show me something like a simple program >>that makes an LED flash or get input from a pushbutton connected to >>the breakout-gs that would be killer and should totally be put on the >>wiki. >> >>-Kevin >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >>for problems? Stop! Download the new AJAX search engine that makes >>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >>http://sel.as-us.falkag.net/sel?cmd_______________________________________ ________ >>gumstix-users mailing list >>gum...@li... >>https://lists.sourceforge.net/lists/listinfo/gumstix-users >> >> |