Hdk7515_Setpowermode - Psion EP10 User Manual

Hand-held computer hdk
Hide thumbs Also See for EP10:
Table of Contents

Advertisement

Chapter 3: Software
EP10 HDK API Functions
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
DWORD GetPower(BOOL *powerState)
{
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7515_Open(&hdkHandle, Hdk7515_Connector_Docking);
if( result != ERROR_SUCCESS ) {
}
BOOL powerEnabled = FALSE;
result = Hdk7515_GetPower(hdkHandle, &powerEnabled);
if( result == ERROR_SUCCESS ) {
}
Hdk7515_Close(hdkHandle);
hdkHandle = INVALID_HANDLE_VALUE;
return result;
}
3.7.3.5

Hdk7515_SetPowerMode

Syntax
DWORD Hdk7515_SetPowerMode( HANDLE hdk, Hdk7515_PowerMode mode );
Parameters
hdk – [in] an open HDK handle.
mode – [in] the new power mode for the peripheral.
Description
This function is used to configure the power mode for the peripheral attached to the connector. There are
currently two modes available: Auto and Manual.
If the power mode of the peripheral is Manual, the connector power will not be controlled by the Peripher-
als Driver. A loaded device driver/application must enable and disable the power.
If the power mode of the peripheral 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.
24
Psion EP10 HDK User Manual
return ERROR_NOT_SUPPORTED;
*powerState = powerEnabled;

Advertisement

Table of Contents
loading

Related Products for Psion EP10

Table of Contents