b/w reflective mode for monitor

Mitch Bradley wmb at firmworks.com
Sun Feb 4 21:28:14 EST 2007


James Cameron wrote:
> Are there application level software controls for the LEDs?  Turning off
> the backlight for astronomy use is great, but that leaves the B-Test-1
> units with one or two green LEDs still active, shining through both
> sides of the upper section, and through the white case.  They are quite
> bright in the dark.
>   
The power LEDs are controlled by the EC (embedded controller) firmware, 
which provides no explicit provision whereby higher level software can 
ask for them to be turned off.

But there is a subterfuge that works.  The LEDs happen to be driven by 
GPIO pins on the EC chip.  From the main CPU, you can control the EC 
chip's GPIO pins.   If you turn off the "output enable" bit on the pin 
that controls the power light, the light goes out.  It seems unlikely 
that the EC firmware would notice that and turn it back on.  Most code 
that deals with GPIOs sets up the basic configuration (enables, etc) 
once, then subsequently use the "output value" bits to control the pins.

You can demonstrate this from the firmware as follows:

   ok  d5  fc11 ec!

That is a brute force way; in practice you would want to read the value, 
turn off the 02 bit, and write it back:

   ok  fc11 ec@  2 invert and  fc11 ec!

ec@ and ec! are shorthand Forth words that perform a little I/O port 
dance to access internal EC chip registers - write 0xfc to I/O port 
0x381, write 0x11 to I/O port 0x382, then either read or write the value 
at I/O port 0x383.





More information about the Devel mailing list