E-EQ-MX3CERG-A-ARC MX3-CE Reference Guide
Appendix C API Calls
Introduction
This appendix documents only the LXE-specific API calls for the MX3-CE. It is intended as an
appendix to the standard Microsoft Windows CE API documentation. Details of many of the calls
in this appendix to the MX3-CE Reference Guide may be found in Microsoft’s documentation.
These LXE specific API calls and registry settings cover the following:
• Power Management
• Scanner
• Serial Ports
• Version Control
• Hardware port access
Also included are instructions on reflashing the MX3-CE.
Power Management API
Docked Status
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().
#define FPGA_PWR_ STATUS 8
#define BIT_JACKED 0x04
#define BIT_DOCKED 0x08
if (ReadFPGARegister(FPGA_PWR_STATUS, &val))
{
if (val & BIT_JACKED)
ShowWindow(GetDlgItem(hwnd, IDC_JACKED), SW_SHOW);
if (val & BIT_DOCKED)
ShowWindow(GetDlgItem(hwnd, IDC_DOCKED), SW_SHOW);
}
Battery Power Status
Battery status can be obtained from a standard Win32 API call:
SYSTEM_POWER_STATUS_EX2 batt;
GetSystemPowerStatusEx2(&batt, sizeof(batt), TRUE);
This gives voltages for both main and backup batteries in millivolts, and an estimated percentage
of the life left in the main battery. Not all fields in this structure are filled.