From owner-freebsd-questions Fri Apr 19 18:19:32 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA15483 for questions-outgoing; Fri, 19 Apr 1996 18:19:32 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id SAA15477 for ; Fri, 19 Apr 1996 18:19:25 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id KAA21461; Sat, 20 Apr 1996 10:43:07 +0930 From: Michael Smith Message-Id: <199604200113.KAA21461@genesis.atrad.adelaide.edu.au> Subject: Re: How can I read/write from/to an I/O-port? To: smpatel@umiacs.umd.edu (Sujal Patel) Date: Sat, 20 Apr 1996 10:43:07 +0930 (CST) Cc: eeg@telecom.at, freebsd-questions@freebsd.org In-Reply-To: from "Sujal Patel" at Apr 19, 96 10:01:06 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Sujal Patel stands accused of saying: > > > Under Linux a /dev/port exits to write/read to/from an I/O-port. > > Does a similar /dev/??? exits under FreeBSD or must I write > > a little device driver for this? > > After you open /dev/io as read-only, you can then use inb & outb from > machine/cpufunc.h-- Note that if you want to use values out of variables you will have to use inbv() and outbv(). ie out(0x100,0x00) is fine, but you need outbv(0x100,foo). -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[