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.
plus i want the app to be linux compatible and i don't think ppi exists on linux. 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? cheers. alex Alexey Shuvaev schrieb am 2009-07-22: > On Wed, Jul 22, 2009 at 12:43:20AM +0200, Alexander Best wrote: > > hi there, > > i've written an app in c (and a bit of asm) which needs to do raw > > parallel > > port io using the i386 opcodes in/out. to get the number of > > available parallel > > ports installed and their addresses i open and mmap /dev/mem and > > read the > > address-values from the BIOS area @ 0x408. is there a better way to > > find out > > the number of parallel ports installed and their addresses? > Why not to use /dev/ppi interface? > man 4 ppi > It is in GENERIC kernel. > You don't need assembler then. > You can look at your dmesg to count all ppc parallel ports: > [snip] > ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77f irq 7 drq 3 on > acpi0 > ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode > ppc0: FIFO with 16/16/9 bytes threshold > ppc0: [ITHREAD] > ppbus0: <Parallel port bus> on ppc0 > plip0: <PLIP network interface> on ppbus0 > plip0: [ITHREAD] > lpt0: <Printer> on ppbus0 > lpt0: [ITHREAD] > lpt0: Interrupt-driven port > ppi0: <Parallel I/O> on ppbus0 > [snip] > Alexey. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"