public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Low-level help needed with leds
@ 2001-10-30 11:49 david.heremans
  2001-10-30 12:54 ` Abraham vd Merwe
  0 siblings, 1 reply; 2+ messages in thread
From: david.heremans @ 2001-10-30 11:49 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]


Hello all,

I'm writing to this maillinglist as a last resort, since reading books
and other peoples code didn't solve my problem, and it is on the vague
boundary of userspace/kernel.

I recently got hold of a nice little piece of hardware that must be
connected between the computer and the keyboard. You can program this
device by sending it bytes trough the keyboard-leds.
More about this device at http://www.andywarne.pwp.blueyonder.co.uk/,
the device is called the I-Pac.

The programming protocol description I got from the maker of this hardware states this
sequence.
1. Set any led combination execpt all leds on.
2. Send five times all leds on.
3. The I-Pac will send a key-down code for the 'Y' (ready to program) or
'J' (jumper set to fixed) key.

I don't get this key code back.
I was wondering if I misunderstood the way the Linux kernel sends this
LEDs commands. Does it send extra led commands that I don't know about?
Maybe it doesn't send twice the same led formation since it would be a
logical optimisation? Honestly, I'm completely clueless by now, and
digging into the Linux source code is way to complicated for me, I
honestly tried but got lost in it (tasklets et all) :-(

I took the liberty of attaching a simplified version of
my programming tool. If some of the more knowledgable people here could
please help me out, thanks.

Sincerely,
David Heremans

PS: I'm not subscribed to this list, I just scan the archieves and
digests from time to time. So I you reply please put me in CC.
PPS: When compiling the c program I also got redefine warnings in
headers, sugestions to solve these are also welcomme, the include list I
use is a mix of other example programs, so I'm not sure which are the
exact ones to use.

[-- Attachment #2: led_test.tgz --]
[-- Type: application/x-gtar, Size: 2421 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Low-level help needed with leds
  2001-10-30 11:49 Low-level help needed with leds david.heremans
@ 2001-10-30 12:54 ` Abraham vd Merwe
  0 siblings, 0 replies; 2+ messages in thread
From: Abraham vd Merwe @ 2001-10-30 12:54 UTC (permalink / raw)
  To: david.heremans; +Cc: Linux Kernel Development


[-- Attachment #1.1: Type: text/plain, Size: 3051 bytes --]

Hi david.heremans!

I browsed through linux/drivers/char/pc_keyb.c and linux/drivers/keyboard.c
and it doesn't seem like it's caching sets/gets. I quickly browsed through
your code, but I didn't really look for errors. Instead, I hacked a quick
program for you which does exactly what you want. I don't have an ipac, but
I tested it on my PC (just pressed the keys, etc.) and it should work. If it
doesn't you should check the datasheet and see whether there shouldn't be
any delays between settings the leds.

PS: The program is attached

> I'm writing to this maillinglist as a last resort, since reading books
> and other peoples code didn't solve my problem, and it is on the vague
> boundary of userspace/kernel.
> 
> I recently got hold of a nice little piece of hardware that must be
> connected between the computer and the keyboard. You can program this
> device by sending it bytes trough the keyboard-leds.
> More about this device at http://www.andywarne.pwp.blueyonder.co.uk/,
> the device is called the I-Pac.
> 
> The programming protocol description I got from the maker of this hardware states this
> sequence.
> 1. Set any led combination execpt all leds on.
> 2. Send five times all leds on.
> 3. The I-Pac will send a key-down code for the 'Y' (ready to program) or
> 'J' (jumper set to fixed) key.
> 
> I don't get this key code back.
> I was wondering if I misunderstood the way the Linux kernel sends this
> LEDs commands. Does it send extra led commands that I don't know about?
> Maybe it doesn't send twice the same led formation since it would be a
> logical optimisation? Honestly, I'm completely clueless by now, and
> digging into the Linux source code is way to complicated for me, I
> honestly tried but got lost in it (tasklets et all) :-(
> 
> I took the liberty of attaching a simplified version of
> my programming tool. If some of the more knowledgable people here could
> please help me out, thanks.
> 
> Sincerely,
> David Heremans
> 
> PS: I'm not subscribed to this list, I just scan the archieves and
> digests from time to time. So I you reply please put me in CC.
> PPS: When compiling the c program I also got redefine warnings in
> headers, sugestions to solve these are also welcomme, the include list I
> use is a mix of other example programs, so I'm not sure which are the
> exact ones to use.

> -rw-r--r-- david/david    3131 2001-10-16 09:47:33 console-lib-program-ipac.inc
> -rw------- david/david    3491 2001-10-16 22:28:02 program-ipac.c


-- 

Regards
 Abraham

Work is the crab grass in the lawn of life.
		-- Schulz

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Antree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham@2d3d.co.za         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa


[-- Attachment #1.2: ipac.tar.gz --]
[-- Type: application/octet-stream, Size: 1519 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-30 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-30 11:49 Low-level help needed with leds david.heremans
2001-10-30 12:54 ` Abraham vd Merwe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox