Date: Fri, 24 Jul 2009 12:42:34 +0200 (CEST) From: Alexander Best <alexbestms@math.uni-muenster.de> To: John Baldwin <jhb@freebsd.org>, <freebsd-hackers@freebsd.org> Cc: Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de> Subject: Re: checking number of parallel ports installed and their port adresses Message-ID: <permail-20090724104234f0889e8400006fa9-a_best01@message-id.uni-muenster.de> In-Reply-To: <200907230833.43021.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
thanks for the hint. if spent a bit of time and turned the in/out opcodes to ppi ioctls. actually i was very surprised about the results since you said the overhead wouldn't be that big. uploading a 256 kbyte file i got the following results: using ppi: 17.120 seconds using in/out opcodes: 8.001 seconds so i think i'll rather stick to my old inline assembly code even if it can't be considered nice programming style, but the ppi overhead isn't something i can cope with in my app. cheers. alex John Baldwin schrieb am 2009-07-23: > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-20090724104234f0889e8400006fa9-a_best01>
