-
5.5. Power Control
5.5.1. Get Module 1 Power Status
Function Description:
When system is operated on battery, power saving is necessary. Module 1 power control is
assigned to finger printer module in MR650.
Function call:
BOOL IOC_Module1PowerStatus(DWORD *pStatus);
Parameters(Output):
pStatus:
DWORD *
: Optical status
Return code:
TRUE = Success
FALSE = Unsupported
Example:
DWORD dwStatus;
HANDLE gIOControlDriverHandle;
…
gIOControlDriverHandle = CreateFile(L”IOC1:”, GENERIC_READ |
GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, 0);
If (gIOControlDriverHandle == INVALID_HANDLE_VALUE)
{
// IO device not found, function not supported,
// error process
}
…
…
IOC_Module1PowerStatus(&dwStatus);
if (dwStatus & MODULE1_POWER_BITS)
{
// power is on
}
else {
// power is off
}
…
CloseHandle(gIOControlDriverHandle);
…