Chapter 4: Software
Omnii HDK API Functions
Psion Teklogix Omnii HDK User Manual
39
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.6 Hdk7545_SetPowerMode
Syntax
DWORD Hdk7545_SetPowerMode( HANDLE hdk, Hdk7545_PowerMode mode );
Parameters
•
hdk – [in] an open HDK handle.
•
mode – [in] the new power mode for the device.
Description
This function is used to configure the power mode for the device attached to the connector. There
are currently two modes available: Auto and Manual.
If the power mode of the device is Manual, the connector power will not be controlled by the
Peripherals Driver. A loaded device driver/application must enable and disable the power.
If the power mode of the device is Auto, the Peripherals driver will enable/disable power to the
connectors automatically. Power to the connector is:
1. Applied initially before the device driver for the connected hardware is loaded.
2. Removed when the hand-held is suspended.
3. Reapplied when the hand-held resumes from suspend.
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.
DWORD GetPower()
{
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;
}
BOOL powerEnabled = FALSE;
result = Hdk7545_GetPower(hdkHandle, &powerEnabled);
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: ......