Re: checking number of parallel ports installed and their port adresses

[ Available lists | Index of freebsd-hackers | Month of Jul 2009 | Week of 23 Jul 2009 | Raw email | View thread | Wrap long lines | Reply ]
From
John Baldwin <jhb@freebsd.org>
Date
23 Jul 2009 12:45:29
Subject
Re: checking number of parallel ports installed and their port adresses
Message-ID
200907230833.43021.jhb@freebsd.org

In reply to
References to

[ Hide this part ]
On Wednesday 22 July 2009 3:31:54 pm Alexander Best wrote:
> the ppi manual states that using ioctl with /dev/ppi is extremely slow. i need
> the parallel port to be really fast. i need to communicate with a device that
> uses asynchronous transfer at a rate of ~ 2 mhz. so i need the full ISA bus
> speed to be able to push/pull data to/from the parallel port without any
> delays. timing is really critical. if there's a lot of work to do for the
> scheduler and the io calls get queued too long the transfer will fail.

The overhead of ppi is probably in the noise on a modern CPU. I think you
should be fine with just using ppi(4).

> actually i meant: how can i check the available parallel ports from within my
> app? is there a syscall i can use or something like that?

You can look for ppcX devices perhaps. The easiest way might be to enable
ppi and look for /dev/ppiX devices in /dev.

--
John Baldwin


Elapsed time: 0.236 seconds