Date: Sat, 20 Apr 1996 10:43:07 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: smpatel@umiacs.umd.edu (Sujal Patel) Cc: eeg@telecom.at, freebsd-questions@freebsd.org Subject: Re: How can I read/write from/to an I/O-port? Message-ID: <199604200113.KAA21461@genesis.atrad.adelaide.edu.au> In-Reply-To: <Pine.NEB.3.92.960419095909.1260C-100000@xi.dorm.umd.edu> from "Sujal Patel" at Apr 19, 96 10:01:06 am
next in thread | previous in thread | raw e-mail | index | archive | help
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 [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604200113.KAA21461>