[ Previous | Next | Table of Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Base Operating System and Extensions, Volume 1
Controls and queries the Power
Management states
Standard C Library
(libc.a)
#include <sys/pm.h>
int pm_control_state(control, PMS)
int control;
struct pm_state *PMS;
The pm_control_state
subroutine controls and queries the Power Management (PM) states.
control
| Specifies one of the following Power Management control commands:
- PM_CTRL_QUERY_STATE
- Queries the current system PM state.
- PM_CTRL_REQUEST_STATE
- Requests to move to system full-on, system PM enable, system standby or
system suspend state.
- PM_CTRL_START_STATE
- Forces to move to system full-on, system PM enable, system standby or
system suspend state.
- PM_CTRL_QUERY_REQUEST
- Queries the result of the requested action.
|
PMS
| Specifies a pointer to the following pm_state
structure.
struct pm_state {
int state;
int id;
int event;
int devno;
}
The contents of the structure
depends on the PM control command.
- When the control is
PM_CTRL_QUERY_STATE, state is returned.
- When the control is
PM_CTRL_REQUEST_STATE, input is state and output is id.
- When the control is
PM_CTRL_START_STATE, input is state and output is event and devno
(if event is PM_EVENT_ERROR).
- When the control is
PM_CTRL_QUERY_REQUEST, input is id and output is event and devno
(if event is PM_EVENT_ERROR).
Event value is one of the
following,
- PM_EVENT_LID_OPEN
- LID open
- PM_EVENT_RTC
- specified time to resume
- PM_EVENT_RINGING
- ringing
- PM_EVENT_MOUSE
- mouse event
- PM_EVENT_KEYBOARD
- keyboard event
- PM_EVENT_EXTRA_INPUTDD
- extra input DD
- PM_EVENT_EXTRA_BUTTON
- extra button
- PM_EVENT_ERROR
- action failed
|
PM_SUCCESS
| Indicates successful completion.
|
PM_ERROR
| Indicates an error condition. The variable errno is set
to identify the error.
|
EINVAL
| The argument or command is not valid.
|
The pm_control_state
subroutine is part of the Base Operating System (BOS) Runtime.
The
pm_control_parameter (pm_control_parameter Subroutine) subroutine,
pm_event_query (pm_event_query Subroutine) subroutine,
pm_battery_control (pm_battery_control Subroutine) subroutine.
[ Previous | Next | Table of Contents | Index |
Library Home |
Legal |
Search ]