From owner-freebsd-hackers Tue Apr 25 13:21:12 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from hurricane.columbus.rr.com (m5.columbus.rr.com [204.210.252.249]) by hub.freebsd.org (Postfix) with ESMTP id EFBA037BDC0 for ; Tue, 25 Apr 2000 13:21:03 -0700 (PDT) (envelope-from caa@columbus.rr.com) Received: from columbus.rr.com ([24.95.63.210]) by hurricane.columbus.rr.com (Post.Office MTA v3.5.3 release 223 ID# 0-53939U80000L80000S0V35) with ESMTP id com; Tue, 25 Apr 2000 16:21:14 -0400 Received: (from caa@localhost) by columbus.rr.com (8.9.3/8.9.3) id QAA56534; Tue, 25 Apr 2000 16:21:01 -0400 (EDT) (envelope-from caa) Date: Tue, 25 Apr 2000 16:21:01 -0400 From: "Charles Anderson" To: Alfred Perlstein Cc: Leif Neland , freebsd-hackers@FreeBSD.ORG Subject: Re: Turning on a relay. Message-ID: <20000425162101.D51324@midgard.dhs.org> References: <00b901bfaee7$55da1fe0$0e00a8c0@neland.dk> <20000425123021.F9754@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20000425123021.F9754@fw.wintelcom.net>; from bright@wintelcom.net on Tue, Apr 25, 2000 at 12:30:21PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Yet another way. I used #include ... io_fd = open("/dev/console", O_RDWR, 0); ioctl(io_fd, KDENABIO, 0); and ioctl(io_fd, KDDISABIO, 0); to turn it off again. Is there a "right" way of doing it? Linux has a iopl call that sets the i/o privilege level, it seems much easier and at least better documented. (I was porting glx code, that was using iopl) -Charlie On Tue, Apr 25, 2000 at 12:30:21PM -0700, Alfred Perlstein wrote: > * Leif Neland [000425 12:24] wrote: > > I'd like to turn on a relay to the power for my laserprinter 3 rooms away > > where the server is located. > > > > I have an i/o board with a 8255 24 bit i/o port.(IIRC) > > > > So I wrote a simple userland program to do inb/outb, but it dumped core with > > BUSERR, I presume because userland is not supposed to do i/o to the > > hardware. > > > > I guess I have these options: > > A: write a driver/kernel module to access the port. > > B: use an extra parallel port. (I use 2 at the moment) > > C: use a serial port; I have 3-4 available. > > D: open(/dev/io) > > -Alfred > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- Charles Anderson caa@columbus.rr.com No quote, no nothin' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message