LED driver (8260)

David Bruce dbruce at ll.mit.edu
Tue Mar 22 05:10:44 EST 2005


I've taken Hans Schillstrom's version of rcb8270_led-0001.bin (which is 
based on DENX status_led.c) and "generalized" it for my purposes (I have 
LED's on more that one port and not all pins can be LED's) (This is used 
on a TQM8260). This also has only been tested briefly...

What was done:
1.) put back in DENX copyright; ;^)
2.) removed unknown include files;
3.) put in compile option to NOT initialize a port pin during module 
    install, see #define DO_NOT_INIT_PORT and #ifndef DO_NOT_INIT_PORT;
4.) added "used" field to control structure to specify if LED was ever 
used (set in statusled_open());
5.) put code in statusled_cleanup() that will only shut off a LED if the 
  LED was ever used (opened);

In the led_dev_t led_dev[] control structure, all of the port A & D pins 
are specified (for my needs) but not all are used. (The project that I 
am using this for is a "moving" target and not all of the port pins have 
been specified.) Therefore in the load script, only create devices that 
_ARE_ LED's. Device minor numbers for port A is the port pin number and 
for port D it is the port pin number times 2.

It can be found at:
http://www.geocities.com/dbruce_01721/status_led_8260.c



More information about the Linuxppc-embedded mailing list