Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 1996 15:15:03 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        charlie_conklin@il.us.swissbank.com (Charlie Conklin)
Cc:        questions@FreeBSD.org
Subject:   Re: lpt driver question
Message-ID:  <199601111415.PAA02064@labinfo.iet.unipi.it>
In-Reply-To: <9601111144.AA01349@ln1d279nwk> from "Charlie Conklin" at Jan 11, 96 11:43:56 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Hello all...
> 
> I have a simple piece of hardware that sits on the PC printer port.
> I also have some C source code that compiles and works, and is used
> to talk to that hardware. The code looks fairly simple, basically just
> poking a few values at an io port.
> 
> I am now faced with the task of making the hardware work under
> FreeBSD instead of windows, and I realize that I do not have the
> foggiest notion of how to proceed! :-( Does anyone have any ideas,
> or have some useful direction to point me in? Can I use the lpt
> driver to do this easily?

Don't use the lpt driver (as a matter of fact, you might even want to
disable it).

Instead, insert a call to open "/dev/io": after that, you can play
with the io ports of the PC, which means that you can compile your
C code with almost no changes (except for inb()/outb() which you can
replace with the macros or functions which are part of almost all
device drivers.

> - Charlie Conklin	conklic@swissbank.com
				^^^^^^^^^^^^^
Tell us, are you playing with some super-secret encription key used to
protect electronic money transfers ? :)

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



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