Subject: GPIO on the Soekris net4801
To: None <current-users@netbsd.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: current-users
Date: 09/27/2005 20:57:31
I've recently added support for gpio on the Soekris net4801 based on
the code from OpenBSD. If you want to play with the error LED on your
system, do the following:
1. Update -current sources
2. Add the following to your kernel config:
nsclpcsio* at isa?
gscpcib* at pci? dev ? function ?
gpio* at nsclpcsio?
gpio* at gscpcib?
3. Build a new kernel and userland (to get /usr/include/sys/
gpio.h and /usr/sbin/gpioctl).
4. With a new MAKEDEV in /dev, 'sh MAKEDEV gpio'
Then, if you want to control the error LED, first configure the pin:
# gpioctl -c 20 on pp
Now you can control the error LED.
To turn it on:
# gpioctl 20 1
To turn it off:
# gpioctl 20 0
To toggle the LED (eg if it's on, turn it off; if it's off, turn it on):
# gpioctl 20 2
Have fun!
Cheers,
Jared