Various improvements: wording, macro usage, section naming, structure.

This commit is contained in:
wiz 2008-12-20 17:25:20 +00:00
parent fbbf73942d
commit 824e316688
1 changed files with 37 additions and 31 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pow.4,v 1.12 2008/12/20 16:53:56 wiz Exp $
.\" $NetBSD: pow.4,v 1.13 2008/12/20 17:25:20 wiz Exp $
.\"
.\" Copyright (c) 1995 MINOURA Makoto.
.\" All rights reserved.
@ -28,7 +28,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 2, 1995
.Dd December 20, 2008
.Os
.Dt POW 4 x68k
.Sh NAME
@ -39,28 +39,28 @@ File
.Pa /dev/pow0
is a device used to access the x68k power switch / bootstrap information and
the RTC alarm timer.
The following operations are allowed using
The following operations are allowed using the
.Xr ioctl 2
system call:
.Pp
.Bl -tag -width POWIOCGPOWERINFO -compact -offset indent
.It POWIOGPOWERINFO
Getting power switch status
Get power switch status
.It POWIOGALARMINFO
Getting RTC alarm timer status
Get RTC alarm timer status
.It POWIOSALARMINFO
Setting RTC alarm timer
Set RTC alarm timer
.El
.Pp
The power switch event is notified to
Any power switch events are reported to
.Xr powerd 8 .
.Sh GETTING POWER SWITCH STATUS
.Bd -literal
.In sys/ioctl.h
.In machine/powioctl.h
.Bd -literal -offset indent
#include \*[Lt]sys/ioctl.h\*[Gt]
#include \*[Lt]machine/powioctl.h\*[Gt]
.Fd ioctl (fd, POWIOCGPOWERINFO, \*[Am]powerinfo);
.Fd struct x68k_powerinfo powerinfo;
ioctl (fd, POWIOCGPOWERINFO, \*[Am]powerinfo);
struct x68k_powerinfo powerinfo;
.Ed
.Pp
Returns the power switch status etc. in the following structure.
@ -74,11 +74,14 @@ struct x68k_powerinfo {
};
.Ed
.Pp
Each member means:
The members of the structure mean:
.Bl -hang
.It pow_switch_boottime :
The power switch status at the system start time.
The status is known by applying logical and (\*[Am]) with:
The status can be checked by testing for the following definitions
with the logical
.Dq and
(\*[Am]):
.Pp
.Bl -tag -compact -width POW_EXTERNALSW
.It POW_ALARMSW
@ -102,12 +105,13 @@ Host's boot information from the system memory switch.
Total usage in count (pow_bootcount) and second (pow_usedtotal).
.El
.Sh ACCESSING RTC ALARM TIMER
.Bd -literal
.In sys/ioctl.h
.In machine/powioctl.h
.Ss Getting the alarm timer
.Bd -literal -offset indent
#include \*[Lt]sys/ioctl.h\*[Gt]
#include \*[Lt]machine/powioctl.h\*[Gt]
.Fd ioctl (fd, POWIOCGALARMINFO, \*[Am]alarminfo);
.Fd struct x68k_alarminfo alarminfo;
ioctl (fd, POWIOCGALARMINFO, \*[Am]alarminfo);
struct x68k_alarminfo alarminfo;
.Ed
.Pp
Returns x68k's alarm timer information in the following structure.
@ -120,7 +124,7 @@ struct x68k_alarminfo {
};
.Ed
.Pp
Each of the members means:
The members mean:
.Bl -hang
.It al_enable :
True if the alarm timer is enable.
@ -131,19 +135,19 @@ See
Chapter 3 Section ALARMSET.
.It al_dowhat :
What to do when started by the alarm timer.
See `Programmers' manual'.
See
.Dq Programmers' manual .
.It al_offtime :
Display the time in seconds since the alarm is activated until
the power is turned off (though the resolution
is resolved to minutes).
the power is turned off (though the resolution is resolved to minutes).
Be cautious when using IOCS and the like as these require minute
time units.
0 indicates an infinity.
.El
.Pp
.Bd -literal
.Fd ioctl (fd, POWIOCSALARMINFO, \*[Am]alarminfo);
.Fd struct x68k_alarminfo alarminfo;
.Ss Setting the alarm timer
.Bd -literal -offset indent
ioctl (fd, POWIOCSALARMINFO, \*[Am]alarminfo);
struct x68k_alarminfo alarminfo;
.Ed
.Pp
Sets the alarm timer according to the argument
@ -154,12 +158,14 @@ Sets the alarm timer according to the argument
.Xr powerd 8 ,
.Xr rtcalarm 8
.Rs
`C Compiler PRO-68K Programmers' Manual', Chapter 3 IOCS Calls, Section ALARMSET, Sharp
.%T C Compiler PRO-68K Programmers' Manual', Chapter 3 IOCS Calls, Section ALARMSET
.%I Sharp
.Re
.Sh AUTHORS
.An Minoura Makoto Aq minoura@flab.fujitsu.co.jp .
.Sh SPECIAL THANKS
Liam Hahne Minn \*[Lt]hahne@sail.t.u-tokyo.ac.jp\*[Gt].
.An Minoura Makoto Aq minoura@flab.fujitsu.co.jp
.Ss SPECIAL THANKS
Liam Hahne Minn
.Aq hahne@sail.t.u-tokyo.ac.jp
.Sh BUGS
The file
.Pa /dev/pow0