This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Specify supported power modes for a device
#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);
libpm
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.
For more information, see the device driver chapter.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |