TME-CLR-ECO-R0V6.docx
Rev 0.6
Page 32 of 34
Life LED
The Cool LiteRunner-ECO's Life LED is handled by the Nuvotond W83627HF SuperIO (GP31 on SuperIO ==
PIN19 on supervisory connector). This is located in Logical Device 7 of the SuperIO and can be programmed using
simple IN/OUT instructions on Index/Data registers 4Eh/4Fh.
/*****************************************************
* Set LIFE-LED of Winbond W83627HF Super IO
******************************************************
*
* Please note that this programming example is for
* Linux only. If it shall be ported to run in
* Windows, the IO commands must be switched and
* opened differentyl (Porttalk)
*/
#include <sys/io.h>
#include <stdio.h>
#define SIO_ADDR
0x4e
#define SIO_DATA
0x4f
/* LIFE-LED is off per default if board is booted properly */
#undef LIFE_OFF
int main()
{
char
temp;
/* open IO ports */
iopl(3);
/* initialize SuperIO */
outb(0x87, SIO_ADDR);
outb(0x87, SIO_ADDR);
/* set bit 3 of global CR29 to 1 to activate GP31 for toggling the
LIFE-LED */
outb(0x29, SIO_ADDR);
temp= inb(SIO_DATA);
temp= temp | 0x08;
outb(temp, SIO_DATA);