Subject: Re: LEDs, LCDs and so on (was Re: More SPARCbook insanity )
To: Jonathan Perkin <firstname.lastname@example.org>
From: Michael <email@example.com>
Date: 04/18/2005 07:50:29
Content-Type: text/plain; charset=US-ASCII
> > Hmm, we'd have to come up with a generic interface to CPU-controlled
> > LCDs, LEDs and do on found on various hardware - we don't want
> > anything Tadpole-specific in - say - sd...
> FreeBSD 5.2 has led(4) which may or may not be useful to you.
Having a look at it can't hurt :)
Wow, funky userland interface:
The lamp can be controlled by opening and writing ASCII strings to the /dev=
Three high-level commands are available:
d%d Numbers. Each digit is blinked out at 1/10th second, ze=
as ten pulses. Between digits a one second pause and af=
the last digit a two second pause after which the sequen=
s%s String. This gives full control over the annunciator.
Letters `A' ... `J' turn the annunciator on for from 1/1=
to one full second. Letters `a' ... `j' turn the annunc=
tor off for 1/10th to one full second. Unless terminated
with a `.', the sequence is immediately repeated.
`.' becomes `_*'
`-' becomes `_***'
` ' becomes `__'
`\n' becomes `____'
The sequence is repeated after a one second pause.
I didn't think about supporting morse code, but imagine a kernel panic on a=
box without serial interface(s) or any other way to get a 2nd console, the=
display taken over by XFree which decides to panic. Flashing the panic mes=
sage suddenly sounds like a good idea.
Not /quite/ what I was thinking about ( low-overhead but still generic inte=
rface for internal use by the kernel ) but why not give it a userland inter=
face too. We'd probably need a few ioctl()s to gather information about a g=
iven indicator, like type, label ( well, most of the time we /will/ know th=
e original purpose. Doesn't necessary mean we'd stick to it though ), statu=
s ( on/off, in use by some kernel driver or not... )
PCish Port 80 cards would also be something we could (ab)use, even on non-P=
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)
-----END PGP SIGNATURE-----