[Voyage-linux] GPIO on WRAP

Alfredo Osorio (spam-protected)
Mon Jun 5 09:39:24 HKT 2006


Solomon:

Can this (gpio) be used to run code after the reset button has been pushed
on the wrap? I have found out that on reset the bios posts to port 80h but
don't know how to go after this value to run some code on reboot (e.g. reset
wrap cf to original settings).

Many thanks...

Alfredo


----- Original Message ----- 
From: <voyage-linux at voyage.hk>
To: "Solomon Asare" <solomonasare at yahoo.com>
Cc: <voyage-linux at voyage.hk>
Sent: Sunday, June 04, 2006 4:39 PM
Subject: Re: [Voyage-linux] GPIO on WRAP


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I found the following code from Josef Liska, LRP-Project:
>
> #LED 3: On
> echo "A" | dd of=/dev/port bs=1 count=1 seek=62466
> #LED 3: Off
> echo "L" | dd of=/dev/port bs=1 count=1 seek=62466
> #LED 2: On
> echo "A" | dd of=/dev/port bs=1 count=1 seek=62464
> #LED 2: Off
> echo "L" | dd of=/dev/port bs=1 count=1 seek=62464
> #LED 1: On
> echo "H" | dd of=/dev/port bs=1 count=1 seek=62464
> #LED 1: Off
> echo "D" | dd of=/dev/port bs=1 count=1 seek=62464
>
>
> It work's with some minor bugs... LED 1 and 2 could not be switched on
> off separatly from each other.
>
> You will find in the manual of the board the following documentation of
> the GPIO port:
>
> Front panel LEDs and switch
> LED1 (D3)   GPIO2  write I/O port [GPIOBASE]   bit 2 0 = light
> LED2 (D2)   GPIO3  write I/O port [GPIOBASE]   bit 3 0 = light
> LED3 (D1)   GPIO18 write I/O port [GPIOBASE]   bit 18 0 = light
> Switch (S1) GPIO40 read I/O port [GPIOBASE+20] bit 8 0 = pressed
>
> With tinyBIOS, GPIOBASE is 0F400h. If you would like to write a more
> generic driver, use the SC1100 I/O base registers to determine GPIOBASE.
>
> I also heard that there should be a kernel module (gpio) to drive the
> led's but I did not find any instructions for this purpose...
>
> Have phun!
> rOger
>
> Solomon Asare schrieb:
> > Hi All,
> > has anyone done any work on gpio that he will want to
> > share?
> >
> > Thanks.
> >
> > solo.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFEg0UBaRygM0sabaARAqA7AKCA32K7IyMXWG5OR0PM8PlNSS/0pQCfXWN1
> m7zABi5eT3VHaEaoiD/B/ZQ=
> =6D8C
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux





More information about the Voyage-linux mailing list