I'm looking at using OpenBSD 4.4's gpio functions [1] on a Net4801 to
set some pins [2] to have +3.3 volts when on and 0 volts when off.
However, regardless of the state reported by gpioctl, the pins show
about +3.3 volts on my meter.

        # gpioctl 0 2; gpioctl 2 2; gpioctl 4 2; gpioctl 6 2;
        pin 0: state 1 -> 0
        pin 2: state 1 -> 0
        pin 4: state 0 -> 1
        pin 6: state 0 -> 1

        # gpioctl 0 2; gpioctl 2 2; gpioctl 4 2; gpioctl 6 2;
        pin 0: state 0 -> 1
        pin 2: state 0 -> 1
        pin 4: state 1 -> 0
        pin 6: state 1 -> 0

The gpio<-> JP5 pin mappings are in /etc/rc.securelevel as follows:

        gpioctl -c 00 out pp;   # should be pin no. 3 ?
        gpioctl -c 02 out pp;   # should be pin no. 5 ?
        gpioctl -c 04 out pp;   # should be pin no. 7 ?
        gpioctl -c 06 out od;   # should be pin no. 9 ?

FWIW, there does not seem to be an obvious way to leave the system in
securelevel 0.  The boot sequence says
        "setting kernel security level: kern.securelevel: 0 -> 0"
but from the shell, it shows level 1:
        $ sysctl kern.securelevel
        kern.securelevel=1
That's even after trying to set it explicitly in /etc/rc:
        sysctl kern.securelevel=0
(yeah, that should be left alone...)



Regards
-Lars

[1]
http://www.openbsd.org/cgi-bin/man.cgi?query=gpioctl&apropos=0&sektion=0&manpath=OpenBSD+4.4&arch=i386&format=html

[2]  see sect. 3.5 JP5, User I/O:
        http://www.soekris.com/manuals/net4801_manual.pdf

_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to