Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Oct 2000 13:00:51 +0200
From:      Willem van Engen <wvengen@stack.nl>
To:        freebsd-hackers@freebsd.org
Subject:   FreeBSD 4.x kld device driver
Message-ID:  <39D9BC63.7C7EDD43@stack.nl>

next in thread | raw e-mail | index | archive | help
I'm writing a device driver for FreeBSD 3.x and 4.x for the application
panel of the fujitsu lifebook c4110 notebook (a led, lcd and some
buttons). It took me some time to get a working driver (compiles on both
3.x and 4.x), but it's not really clean code. I'd like to rewrite it,
but I can't find how to do it properly (the kernel sources don't help me
enough). How do I use uimove, DECLARE_MODULE, etc properly? How do I use
more than one device in one module?
Currently I use outb and inb to access the hardware resources. Should
newbus be used in FreeBSD 4.x?

Another question is the architecure of the device driver. How exactly
should the interface to the device be? Currently, I'm thinking of three
devices to control the three different parts /dev/led (led), /dev/lcd
(lcd) and /dev/abtn (buttons). Ascii numbers should be written to/read
from the character devices. Is this the way to do it, or should system
calls be used (harder to use in shell scripts) or binary values?

Thanks in advance.

Willem van Engen <wvengen@stack.nl>

See the application panel project at http://willem.n3.net/fujitsu/


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?39D9BC63.7C7EDD43>