Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 2009 13:11:04 +0930
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        freebsd-hackers@freebsd.org
Cc:        Ivan Voras <ivoras@freebsd.org>
Subject:   Re: Parallel port headers
Message-ID:  <200908251311.12503.doconnor@gsoft.com.au>
In-Reply-To: <h6v0jn$et$1@ger.gmane.org>
References:  <h6v0jn$et$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1386211.b6zfeR6ZaB
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tue, 25 Aug 2009, Ivan Voras wrote:
> Hi,
>
> At least one on-line tutorial about parallel port hacking
> (http://www.excamera.com/articles/21/parallel.html) uses these header
> files:
>
> #include <sys/dev/ppbus/ppi.h>
> #include <sys/dev/ppbus/ppbconf.h>
>
> They are actually present in /sys, but not in the normal userland
> include paths. Is this intentional, or was it removed sometimes in
> the past?

According to the ppi man page it's..
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>

int
main(int argc, char **argv) {
        int     fd;

        if ((fd =3D open("/dev/ppi0", O_RDWR)) =3D=3D -1) {
                printf("Can't open /dev/ppi0\n");
                exit(1);
        }

        exit(0);
}

Those includes are present on my 7.2 box (upgraded with the last week)=20
and my (oldish) -current box.

=2D-=20
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

--nextPart1386211.b6zfeR6ZaB
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iD8DBQBKk11Y5ZPcIHs/zowRAqzWAJ9FJXUiBtx3oi6MT1alA06/caB8CgCeOab4
yNmVHb5n5Svm9lWcIHMbZLY=
=4e/m
-----END PGP SIGNATURE-----

--nextPart1386211.b6zfeR6ZaB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908251311.12503.doconnor>