Share via


PDCardSetAdapter

This function sets power-save mode status and capabilities.

STATUS PDCardSetAdapter(
  UINT32 uSocket,
  PPDCARD_ADAPTER_STATE pState 
);

Parameters

  • uSocket
    [in] Specifies the identifier number of the PC Card socket to modify.
  • pState
    [in] Pointer to the socket's status and capabilities.

Return Values

Returns one of the return codes in the Cardserv.h header file.

Remarks

If the ADP_STATE_POWEROFF bit is set, the PC Card system is turned off. If the ADP_STATE_POWERDOWN bit is set, the PC Card system is placed in power-save mode. In power-save mode, it is expected that card insertion and removal events are detected. If both of these bits are off, the PC Card system is placed in full-power mode. The PDCardSetAdapter function is called in critical power situations, so it should not block or yield.

The following table shows optional flags that help prevent extraneous resumes when CFG_ATTR_NO_SUSPEND_UNLOAD and CFG_ATTR_IRQ_WAKEUP are requested.

Flags Description
ADP_STATE_NODETECT Disables card detection for a socket.
ADP_STATE_NOIRQ Functional IRQs are disabled for a socket.
BVD1, BVD2 and READY These flags should be disabled if possible. It is not necessary to enable any socket events, as a later call to PDCardSetSocket will restore the state.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Sockserv.h.
Link Library: Cardserv.lib.

See Also

PC Card Drivers

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.