xref: /netbsd-src/usr.sbin/tadpolectl/tadpolectl.8 (revision 4d5abbe83f525258eb479e5fca29f25cb943f379)
1.\" $NetBSD: tadpolectl.8,v 1.8 2008/09/25 13:10:53 reed Exp $
2.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
3.\" All rights reserved.
4.\"
5.\" This code is derived from software contributed to The NetBSD Foundation
6.\" by Tim Rightnour
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27.\" POSSIBILITY OF SUCH DAMAGE.
28.\"
29.Dd December 16, 1999
30.Dt TADPOLECTL 8 sparc
31.Os
32.Sh NAME
33.Nm tadpolectl
34.Nd get or set tadpole microcontroller state
35.Sh SYNOPSIS
36.Nm tadpolectl
37.Op Fl n
38.Ar name ...
39.Nm tadpolectl
40.Op Fl n
41.Fl w
42.Ar name=value ...
43.Nm tadpolectl
44.Op Fl n
45.Fl a
46.Sh DESCRIPTION
47The
48.Nm tadpolectl
49utility retrieves values from the ts102 microcontroller
50and allows processes with appropriate privilege to set some values.
51The state to be retrieved or set is described using a
52``Management Information Base'' (``MIB'') style name,
53described as a dotted set of components.
54The
55.Fl a
56flag can be used to list all the currently available string or integer values.
57.Pp
58The
59.Fl n
60flag specifies that the printing of the field name should be
61suppressed and that only its value should be output.
62This flag is useful for setting shell variables.
63For example, to save the mains power status in variable mains, use:
64.Bd -literal -offset indent -compact
65set mains=`tadpolectl -n hw.power.mains`
66.Ed
67.Pp
68If just a MIB style name is given,
69the corresponding value is retrieved.
70If a value is to be set, the
71.Fl w
72flag must be specified and the MIB name followed
73by an equal sign and the new value to be used.
74.Pp
75The information available from
76.Nm tadpolectl
77consists of only integers.  Some registers can be modified, but have no
78way of reading what the current value is.  Those registers will always
79display
80.Dq 0 .
81.Pp
82The changeable column indicates whether a process with appropriate
83privilege can change the value, and if a displayed value is valid.
84.Bl -column hw.power.battery.int.chargelevel Changeable Valid
85.It Sy Name	Changeable	Valid
86.It hw.microcontroller.version	no	yes
87.It hw.version	no	yes
88.It hw.poweroncycles	no	yes
89.It hw.poweronseconds	no	yes
90.It hw.power.mains	no	yes
91.It hw.power.battery.int	no	yes
92.It hw.power.battery.ext	no	yes
93.It hw.power.battery.chargedisabled	yes	yes
94.It hw.power.battery.int.chargerate	yes	yes
95.It hw.power.battery.ext.chargerate	yes	yes
96.It hw.power.battery.int.chargelevel	no	yes
97.It hw.power.battery.ext.chargelevel	no	yes
98.It hw.video.external	no	yes
99.It hw.video.lid	no	yes
100.It hw.video.syncinva	yes	yes
101.It hw.video.syncinvb	yes	yes
102.It hw.video.compsync	yes	yes
103.It hw.video.tft.brightness	yes	yes
104.It hw.speaker.freq	yes	no
105.It hw.speaker.volume	yes	yes
106.It hw.kbd.repeat.delay	yes	yes
107.It hw.kbd.repeat.speed	yes	yes
108.It hw.kbd.click	yes	yes
109.It hw.mouse.recalibrate	yes	no
110.It hw.mouse.disable	yes	yes
111.It hw.mouse.intclick	yes	yes
112.It hw.mouse.extclick	yes	yes
113.It hw.mouse.sensitivity	yes	yes
114.It hw.serial.power	yes	yes
115.El
116.Sh EXAMPLES
117For example, to retrieve the current internal battery charge level,
118one would use the following request:
119.Bd -literal -offset indent -compact
120tadpolectl hw.power.battery.int.chargelevel
121.Ed
122.Pp
123To set the speaker beep frequency of
124the system to 1000, one would use the following request:
125.Bd -literal -offset indent -compact
126tadpolectl -w hw.speaker.freq=1000
127.Ed
128.Sh SEE ALSO
129.Xr sysctl 8
130.Sh HISTORY
131.Nm tadpolectl
132first appeared in
133.Nx 1.5 .
134