[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]
Base Operating System and Extensions Technical Reference, Volume 1
pm_control_parameter Subroutine
Purpose
Controls and queries Power Management parameters.
Library
Standard C Library (libc.a)
Syntax
#include <sys/pm.h>
int pm_control_parameter (control, argument)
int control;
caddr_t argument;
Description
The pm_control_parameter subroutine controls and queries
Power Management parameters.
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. |
Return Values
PM_SUCCESS |
Indicates successful completion. |
PM_ERROR |
Indicates an error condition. The variable errno is set to identify the error. |
Error Codes
EINVAL |
The argument or control is not valid. |
Implementation Specifics
The pm_control_parameter subroutine is part of the Base
Operating System (BOS) Runtime.
Related Information
The pm_control_state subroutine, pm_event_query subroutine, pm_battery_control subroutine.
[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]