Hdk7515_Getpowermode - Psion EP10 User Manual

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

Advertisement

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 SetPowerMode(Hdk7515_PowerMode powerMode)
{
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7515_Open(&hdkHandle, Hdk7515_Connector_Docking);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
Hdk7515_PowerMode mode = Hdk7515_PowerMode_Manual;
result = Hdk7515_GetPowerMode(hdkHandle, &mode);
if( result != ERROR_SUCCESS ) {
Hdk7515_Close(hdkHandle);
hdkHandle = INVALID_HANDLE_VALUE;
return result;
}
if( mode != powerMode ) {
result = Hdk7515_SetPowerMode(hdkHandle, powerMode);
}
Hdk7515_Close(hdkHandle);
hdkHandle = INVALID_HANDLE_VALUE;
return result;
}
3.7.3.6

Hdk7515_GetPowerMode

Syntax
DWORD Hdk7515_GetPowerMode( HANDLE hdk, Hdk7515_PowerMode *mode );
Parameters
hdk – [in] an open HDK handle.
mode – [out] pointer to a Hdk7515_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 peripheral attached to the connector. There
are currently two modes available: Auto and Manual.
The default power mode is Manual.
Chapter 3: Software
EP10 HDK API Functions
Psion EP10 HDK User Manual
25

Advertisement

Table of Contents
loading

Related Products for Psion EP10

Table of Contents