A SERVICE OF

logo

Power Management API C-3
E-EQ-MX3CERG-A-ARC MX3-CE Reference Guide
COM3 Ring Indicator Power
One or more control lines are not connected. This is usually a cable problem, but on a laptop or
other device, it may indicate a bad serial port.
See Also: ReadFPGA() and WriteFPGA().
#define FPGA_PWR_CNTL2 11
#define BIT_COM3RI 0x01
void SetCOM3RI(int onoff)
{
int val;
ReadFPGA(FPGA_PWR_CNTL2, &val);
if (onoff)
val |= BIT_COM3RI; // RI power on
else
val &= ~BIT_COM3RI; // RI power off
WriteFPGA(FPGA_PWR_CNTL2, val);
}
Display Power On/Off
The standard Win32 API call ExtEscape() can be made to turn the display power on and off. Note
that because this subverts the power management system, it may become confused as to the current
state of the display power.
HDC hdc;
VIDEO_POWER_MANAGEMENT vpm;
hdc = GetDC(hwnd);
vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
vpm.DPMSVersion = 0x0001;
vpm.PowerState = VideoPowerOff;
// Power off the display
ExtEscape(hdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR)
&vpm, 0, NULL);
Sleep(3000);
vpm.PowerState = VideoPowerOn;
// Power on the display
ExtEscape(hdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR)
&vpm, 0, NULL);
ReleaseDC(NULL, hdc);