[ Previous | Next | Table of Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Base Operating System and Extensions, Volume 1
Controls and queries Power
Management parameters.
Standard C Library
(libc.a)
#include <sys/pm.h>
int pm_control_parameter (control, argument)
int control;
caddr_t argument;
The
pm_control_parameter subroutine controls and queries Power
Management parameters.
control
| Specifies one of the following Power Management (PM) control
commands:
- PM_CTRL_QUERY_SYSTEM_IDLE_TIMER
- Queries system idle timer.
- PM_CTRL_SET_SYSTEM_IDLE_TIMER
- Sets system idle timer.
- PM_CTRL_QUERY_DEVICE_IDLE_TIMER
- Queries device idle timer.
- PM_CTRL_SET_DEVICE_IDLE_TIMER
- Sets device idle timer.
- PM_CTRL_QUERY_LID_CLOSE_ACTION
- Queries the LID close action.
- PM_CTRL_SET_LID_CLOSE_ACTION
- Sets the LID close action.
- PM_CTRL_QUERY_SYSTEM_IDLE_ACTION
- Queries the system idle action.
- PM_CTRL_SET_SYSTEM_IDLE_ACTION
- Sets the system idle action.
- PM_CTRL_QUERY_MAIN_SWITCH_ACTION
- Queries the main power switch action.
- PM_CTRL_SET_MAIN_SWITCH_ACTION
- Sets the main power switch action.
- PM_CTRL_QUERY_LOW_BATTERY_ACTION
- Queries the low battery action.
- PM_CTRL_SET_LOW_BATTERY_ACTION
- Sets the low battery action.
- PM_CTRL_QUERY_BEEP
- Queries whether beep is enabled or not.
- PM_CTRL_SET_BEEP
- Enables/disables beep.
- PM_CTRL_QUERY_PM_DD_NUMBER
- Queries the number of PM aware DDs.
- PM_CTRL_QUERY_PM_DD_LIST
- Returns an array of devno of PM aware DDs.
- PM_CTRL_QUERY_LID_STATE
- Queries the LID state.
|
argument
| The value of the argument parameter depends on the Power
Management control command.
|
| For the following Power Management commands, the argument
parameter is a pointer to an integer in which result value is stored:
- PM_CTRL_QUERY_SYSTEM_IDLE_TIMER
- PM_CTRL_QUERY_LID_CLOSE_ACTION
- PM_CTRL_QUERY_SYSTEM_IDLE_ACTION
- PM_CTRL_QUERY_MAIN_SWITCH_ACTION
- PM_CTRL_QUERY_LOW_BATTERY_ACTION
- PM_CTRL_QUERY_BEEP
- PM_CTRL_QUERY_PM_DD_NUMBER
- PM_CTRL_QUERY_LID_STATE
|
| For the following Power Management commands, the argument
parameter is an integer to be set.
- PM_CTRL_SET_SYSTEM_IDLE_TIMER
- PM_CTRL_SET_LID_CLOSE_ACTION
- PM_CTRL_SET_SYSTEM_IDLE_ACTION
- PM_CTRL_SET_MAIN_SWITCH_ACTION
- PM_CTRL_SET_LOW_BATTERY_ACTION
- PM_CTRL_SET_BEEP
|
| For the PM_CTRL_PM_QUERY_DEVICE_TIMER and
PM_CTRL_SET_DEVICE_TIMER commands, the argument
parameter is a pointer to the following structure:
struct pm_device_timer_struct {
dev_t devno; /* device major/minor number */
int mode; /* device mode */
int device_idle_time;/* if -1, don't care */
int device_standby_time;/*if -1, don't care */
}
|
| For the PM_CTRL_QUERY_PM_DD_LIST command, the
argument parameter specifies a pointer to an array of
integers.
|
PM_SUCCESS
| Indicates successful completion.
|
PM_ERROR
| Indicates an error condition. The variable errno is set
to identify the error.
|
EINVAL
| The argument or control is not valid.
|
The
pm_control_parameter subroutine is part of the Base Operating
System (BOS) Runtime.
The pm_control_state (pm_control_state 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 ]