From owner-freebsd-hackers Mon Apr 10 2:15:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 4905937B7AB for ; Mon, 10 Apr 2000 02:15:24 -0700 (PDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (billy-club.village.org [10.0.0.3]) by rover.village.org (8.9.3/8.9.3) with ESMTP id DAA18706 for ; Mon, 10 Apr 2000 03:15:22 -0600 (MDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (localhost.village.org [127.0.0.1]) by billy-club.village.org (8.9.3/8.8.3) with ESMTP id DAA54900 for ; Mon, 10 Apr 2000 03:15:34 -0600 (MDT) Message-Id: <200004100915.DAA54900@billy-club.village.org> To: hackers@freebsd.org Subject: Sample newbus driver: LED driver for I-Opener Date: Mon, 10 Apr 2000 03:15:34 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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