From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 23 12:45:29 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5947106564A for ; Thu, 23 Jul 2009 12:45:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 766608FC1E for ; Thu, 23 Jul 2009 12:45:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3147C46B49; Thu, 23 Jul 2009 08:45:29 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 2A64A8A0A2; Thu, 23 Jul 2009 08:45:28 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 23 Jul 2009 08:33:42 -0400 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907230833.43021.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 23 Jul 2009 08:45:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Alexey Shuvaev , Alexander Best Subject: Re: checking number of parallel ports installed and their port adresses X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 12:45:30 -0000 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