summaryrefslogtreecommitdiff
path: root/man/3/switch
blob: 4c74db66e2e51471794cbc9bd1b865b47feba40c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.TH SWITCH 3 MPC8xx
.SH NAME
switch \- hardware option switch
.SH SYNOPSYS
.nf
.B bind -a '#r' /dev

.B /dev/switch
.fi
.SH DESCRIPTION
.PP
The switch device serves a one-level directory,
giving access to one read-only file,
.BR switch .
A read returns the value of the development board's
option switch (DS1), represented as a decimal number
from 0 to 15, representing four bits,
each corresponding to one of the four toggles.
Each toggle produces the value 0 when it
is set `ON' and 1 when it is off.
Toggle 1 corresponds to bit
.B 1<<3
in the number,
toggle 2 corresponds to bit
.BR 1<<2 ,
and so on
.SH SOURCE
.B /os/mpc/devrtc.c