Date: Fri, 24 Dec 2004 00:11:57 +0200 From: Nimrod Mesika <nimrod-me@bezeqint.net> To: freebsd-questions@freebsd.org Subject: ppbus programming / porting freenomad to FreeBSD Message-ID: <20041223221157.GA1577@localhost.bsd.net.il>
next in thread | raw e-mail | index | archive | help
Hi all,
I'm trying to port 'freenomad' (an abandoned sourceforge project)
from Linux to FreeBSD.
The software uses the Linux parallel port framework (parport) to
setup a simple IEEE 1284 ECP session.
It seems like the equivalent functionality is provided by FreeBSD's
ppbus(4). However, I can't find any documentation/example code for
using ppbus from a userland application.
Specifically, the Linux app does the following:
1. open("/dev/parport0", O_RDWR)
2. Claim the port (Linux ioctl PPCLAIM)
3. Negotiate ECP (Linux ioctl PPNEGOT with arg. IEEE1284_MODE_ECP)
Before reading or writing it sets the parallel port direction
4. ioctl( fd, PPDATADIR, &direction ) (direction=0/1)
5. write() or read() using the handle returned by open()
On exit
6. Release the port: ioctl( fd, PPRELEASE )
7. close(fd)
I need to find the equivalent code for FreeBSD and would appreciate
any pointers you might have.
Thanks,
Nimrod.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041223221157.GA1577>
