[Avila] GPIO Support and Usage

Tim Harvey tim_harvey at yahoo.com
Tue Nov 14 15:08:38 EST 2006


Josh,=0A=0AThe Gateworks v0.6 BSP contains a rudimentary gpio driver for th=
e ixp4xx and a sample script  called 'setled' that will show how to use it.=
=0A=0ATo build with these options you need to enable CONFIG_USER_GATEWORKS_=
AVILA and CONFIG_USER_GATEWORKS_AVILA_SETLED (for the userland gpio program=
 at user/avila/src/gpio*.c and setled script located at user/avila/setled) =
and CONFIG_IXP425_GPIO (under character drivers) for the gpio driver locate=
d at $linuxdir/drivers/char/ixp425_gpio.c=0A=0ABy looking at user/avila/set=
led you can see its just a simple script that uses the 'gpio' userland util=
ity which interfaces with the ioctl API the driver provides.  The 'gpio' pr=
ogram will allow you to read or write to a gpio.  The GW2348-4 uses GPIO-3 =
for the user-led.=0A=0ATim=0A=0A----- Original Message ----=0AFrom: Josh La=
yhue <josh.layhue at tridsys.com>=0ATo: avila at lists.unixstudios.net=0ASent: Tu=
esday, November 14, 2006 11:04:20 AM=0ASubject: [Avila] GPIO Support and Us=
age=0A=0AI'm pretty new to embedded programming, so please forgive the poor=
ly=0Awritten questions...  I need to drive a few LEDs from an application. =
 I=0Asee that the LED on-board the GW2348-4 board that I have is driven by=
=0Athe GPIO (or at least I believe it is).  How do I control that LED?  Is=
=0Athere a way to turn that LED on/off from an application?  FYI: I'm=0Acur=
rently running a 2.6 uClinux kernel.=0A=0A =0A=0AI read in the manual for t=
he GW2348-4 that there are registers to=0Acontrol the digital I/O (GPOER, G=
POUTR, etc.).  I assume I need to=0Aaccess these registers.  How would I go=
 about doing that if, in fact, I=0Aneed to?=0A=0A =0A=0AThanks in advance f=
or your help.=0A=0A =0A=0AJosh=0A=0A =0A=0A=0A=0A





More information about the Avila mailing list