[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing basic drivers (ISA Output only switch-card)



Hi,

Help!  I need some pointers about where to start when
writing a dead simple ISA card driver on the i386 platform.
I'm normally a userland (eck!) programmer but that stuff
is horrendously boring most of the time...  My new years
resolution is to do something interesting for once...

I was intending to write a simple driver for a yonks old
Maplin ISA 8 bit relay/switch card to turn lights on and
off at home and work up from there to something infinitely
more useful (might be a while then!).  Any ideas about where
is a good place to start so I don't have to make the typical
newbie cock ups?  It's a simple card which takes an 8-bit
IO value on a configurable standard ISA IO port.  There are
16 channels on two bytes originating at the base IO address
(I have mine currently at 0x300h).

Unfortunately, the only thing I've ever seen work with it
was QBASIC on DOS (shudder) using OUTP commands, so an
upgrade to something useful is required.  The intention is
to use my old P133 to turn lights on and off while I'm out
as well as sending SPAM to /dev/null.  I figured that
OpenBSD should be a good start as the code is the cleanest
out there.

Just sending "a=0", "a=1", "b=0" etc to /dev/lights would
be a nice experience as it could be wired into cron quite
easily :)

Cheers,

- Chris.