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;
}
Содержание 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: ......