[Previous] [Contents] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

pmd_attr_setmodes()

Specify supported power modes for a device

Synopsis:

#include <sys/pm.h>

void pmd_attr_setmodes(pmd_attr_t *pmd, 
                       pm_power_mode_t mode, 
                       const pmd_power_mode_t *modes, 
                       int nmodes);

Arguments:

pmd
Pointer to the pmd_attr_t structure to be initialized.
mode
The current device power mode.
modes
An array containing all power modes supported by the device NOTE: pmd->modes is simply assigned to modes, so the modes array cannot be an automatic variable.
nmodes
The number of pmd_mode_attr_t entries in the modes array.

Library:

libpm

Description:

The pmd_attr_setmodes() is used to specify the supported power modes for a device.

The mode argument indicates the current power mode of the device. This mode must be one of the modes listed in the modes array.

If mode corresponds to a PM_MODE_ACTIVE mode, pmd->last_active is set.

Examples:

For more information, see the device driver chapter.

Classification:

Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pmd_attr_t, pmd_attr_init()


[Previous] [Contents] [Next]