[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] RaQ3 front LEDs
- Subject: Re: [cobalt-developers] RaQ3 front LEDs
- From: Michael Stauber <devel@xxxxxxxxxxxxxx>
- Date: Fri Nov 15 09:37:18 2002
- Organization: SOLARSPEED.NET
- List-id: Discussion Forum for developers on Sun Cobalt Networks products <cobalt-developers.list.cobalt.com>
Hi Andy,
> No! I mean the LED's on the front panel of the RaQ3 unit
> (tx/rx, link, col, 100M, disk, web and the cobalt logo with green
> illumination)
>
> I know that probably only the web/cobalt logo could be controlled, since
> others are linked to hardware.
Once when I took the Cobalt Apache apart I found the code which triggers the
web LED:
#ifdef COBALT_RAQ_LED
#include <linux/lcd.h>
#ifdef COBALT_RAQ_LED
struct lcd_display display;
static int ap_lcd_fd = -1;
if (ap_lcd_fd < 0)
ap_lcd_fd = open("/dev/lcd", O_RDWR);
memset(&display, 0, sizeof(display));
display.leds = LED_WEBLIGHT;
ioctl(ap_lcd_fd, LED_Bit_Set, &display);
#endif
#ifdef COBALT_RAQ_LED
display.leds = LED_WEBLIGHT;
ioctl(ap_lcd_fd, LED_Bit_Clear, &display);
#endif
The lcd.h can be found here: /usr/include/linux/lcd.h
Excerpt:
/* the set of all leds available on Cobalt systems */
#define LED_SHUTDOWN (1 << 0)
#define LED_WEBLIGHT (1 << 1)
#define LED_COBALTLOGO (1 << 2)
#define LED_ETH0_TXRX (1 << 3)
#define LED_ETH0_LINK (1 << 4)
#define LED_ETH1_TXRX (1 << 5)
#define LED_ETH1_LINK (1 << 6)
#define LED_DISK0 (1 << 7)
#define LED_DISK1 (1 << 8)
#define LED_DISK2 (1 << 9)
#define LED_DISK3 (1 << 10)
#define LED_SYSFAULT (1 << 11)
#define LED_HEART (1 << 12)
#define LED_SPARE (1 << 13)
#define LED_SLED0 (1 << 14)
#define LED_SLED1 (1 << 15)
#define LED_SLED2 (1 << 16)
#define LED_SLED3 (1 << 17)
#define LED_SPARE2 (1 << 18)
I'm not sure if that helps.
--
With best regards,
Michael Stauber
mstauber@xxxxxxxxxxxxxx
Unix/Linux Support Engineer