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;
}
Содержание OMNii HDK XT10
Страница 4: ......
Страница 10: ......
Страница 12: ......
Страница 18: ......
Страница 20: ......
Страница 24: ......
Страница 26: ......
Страница 32: ......
Страница 72: ......
Страница 90: ......
Страница 92: ......
Страница 116: ......
Страница 124: ......
Страница 126: ......
Страница 130: ......
Страница 132: ......
Страница 154: ......
Страница 168: ......
Страница 170: ......
Страница 182: ......
Страница 184: ......
Страница 188: ......