Hdk7515_Setpower; Hdk7515_Getpower - Psion EP10 User Manual

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

Advertisement

3.7.3.3

Hdk7515_SetPower

Syntax
DWORD Hdk7515_SetPower( HANDLE hdk, BOOL enable );
Parameters
hdk – [in] an open HDK handle.
enable – [in] the new power state of the connector being controlled (see
"Hdk7515_Open").
Description
Powers on/off the connector being controlled.
The power state is reference-counted. If this function is called multiple times with the 'enable' parameter
set to TRUE, it has to be called the same number of times with the 'enable' parameter set to FALSE in order
to power the connector off.
The default power state for connectors is off.
Returns
ERROR_SUCCESS – if successful.
ERROR_INVALID_HANDLE – the specified handle is invalid.
ERROR_INVALID_DATA - an exception was generated.
Other errors are possible.
Sample Code
DWORD SetPower(BOOL powerState)
{
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7515_Open(&hdkHandle, Hdk7515_Connector_Docking);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
result = Hdk7515_SetPower(hdkHandle, powerState);
Hdk7515_Close(hdkHandle);
hdkHandle = INVALID_HANDLE_VALUE;
return result;
}
3.7.3.4

Hdk7515_GetPower

Syntax
DWORD Hdk7515_GetPower( HANDLE hdk, BOOL *enabled );
Parameters
hdk – [in] an open HDK handle.
enabled – [out] pointer to a BOOL containing the current connector power state.
Description
This function is used to determine the current power state of a connector.
The default power state for connectors is off.
Chapter 3: Software
EP10 HDK API Functions
Section 3.7.3.1:
Psion EP10 HDK User Manual
23

Advertisement

Table of Contents
loading

Related Products for Psion EP10

Table of Contents