Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2000 03:15:34 -0600
From:      Warner Losh <imp@village.org>
To:        hackers@freebsd.org
Subject:   Sample newbus driver: LED driver for I-Opener
Message-ID:  <200004100915.DAA54900@billy-club.village.org>

next in thread | raw e-mail | index | archive | help

Here's a simple LED driver for the iopener.  I did this as a thought
excersize since I don't have one running FreeBSD right now.  I've
loaded/unloaded the driver and that's the extent of my testing.

The leds on the iopener are controlled by two leds, according to
publicly available information.  This is a simple driver.  If you read
from it, it gives you back one character status.  If you write to it,
it will turn the led on or off.  Details in the driver.  It is generic
enough that people should find it useful in other applications.

This is also a simple driver that people wishing for examples might
want to use.  It is released under the beerware license from phk, with
his name filed off, and mine inserted, since I wrote it, not him.  It
doesn't do all the foo{reg,var}.h stuff like it should, but it is a
very simple driver.

	http://people.freebsd.org/~imp/led.tar.gz

It compiles and appears to load against -current.  The Makefile and
led.c should be in the same directory.  On -current systems, define
SYSDIR to point to the kernel source and this should just build.
Older systems may need to add it to sys/modules for it to work.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004100915.DAA54900>