Chapter 4: Software
Omnii HDK API Functions
40
Psion Teklogix Omnii HDK User Manual
Returns
•
ERROR_SUCCESS – if successful.
•
ERROR_INVALID_HANDLE – the specified handle is invalid.
•
ERROR_INVALID_PARAMETER – one of the parameters is incorrect or invalid.
•
ERROR_INVALID_DATA - an exception was generated.
•
Other errors are possible.
Sample Code
4.7.4.7 Hdk7545_GetPowerMode
Syntax
DWORD Hdk7545_GetPowerMode( HANDLE hdk, Hdk7545_PowerMode *mode );
Parameters
•
hdk – [in] an open HDK handle.
•
mode – [out] pointer to a Hdk7545_PowerMode value that will contain the current power
mode of the connector.
Description
This function is used to retrieve the current power mode of the device attached to the connector.
There are currently two modes available: Auto and Manual.
The default power mode is Manual.
This function can only be called by a driver, not by an application. The driver that calls this
function must be loaded by the Peripherals driver at startup.
Returns
•
ERROR_SUCCESS – if successful.
•
ERROR_INVALID_HANDLE – the specified handle is invalid.
•
ERROR_INVALID_PARAMETER – one of the parameters is incorrect or invalid.
•
ERROR_INVALID_DATA - an exception was generated.
•
Other errors are possible.
DWORD SetPowerMode()
{
Hdk7545_Connector expansionSlot = Hdk7545_Connector_Expansion1;
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7545_Open(&hdkHandle, expansionSlot);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
result = Hdk7545_SetPowerMode(hdkHandle, Hdk7545_PowerMode_Manual);
if( result != ERROR_SUCCESS ) {
Hdk7545_Close(&hdkHandle);
return ERROR_GEN_FAILURE;
}
Hdk7545_Close(&hdkHandle);
return ERROR_SUCCESS;
}
Summary of Contents for OMNii HDK XT10
Page 4: ......
Page 10: ......
Page 12: ......
Page 18: ......
Page 20: ......
Page 24: ......
Page 26: ......
Page 32: ......
Page 72: ......
Page 90: ......
Page 92: ......
Page 116: ......
Page 124: ......
Page 126: ......
Page 130: ......
Page 132: ......
Page 154: ......
Page 168: ......
Page 170: ......
Page 182: ......
Page 184: ......
Page 188: ......