xref: /original-bsd/share/man/man4/man4.vax/ad.4 (revision b4971bb3)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)ad.4	8.1 (Berkeley) 06/05/93
7.\"
8.Dd
9.Dt AD 4 vax
10.Os BSD 4.2
11.Sh NAME
12.Nm ad
13.Nd Data Translation A/D converter
14.Sh SYNOPSIS
15.Cd "device ad0 at uba0 csr 0170400 vector adintr"
16.Sh DESCRIPTION
17The
18.Nm \&ad
19driver
20provides an interface to the Data Translation A/D converter.
21This is
22.Em not
23a real-time driver, but merely allows
24the user process to sample the board's channels one at a time.
25Each minor device selects a different
26.Tn A/D
27board.
28.Pp
29The driver communicates to a user process by means of
30.Xr ioctl 2 Ns s.
31The
32.Dv AD_CHAN
33.Xr ioctl
34selects which channel of the board to read.
35For example,
36.Bd -literal -offset indent
37chan = 5;
38ioctl(fd, AD_CHAN, &chan);
39.Ed
40.Pp
41selects channel 5.
42The
43.Dv AD_READ
44.Xr ioctl 2
45actually reads the data and returns it to the user
46process.
47An example is
48.Bd -literal -offset indent
49ioctl(fd, AD_READ, &data);
50.Ed
51.Sh FILES
52.Bl -tag -width /dev/adx -compact
53.It Pa /dev/ad
54.El
55.Sh DIAGNOSTICS
56None.
57.Sh HISTORY
58The
59.Nm
60driver appeared in
61.Bx 4.1 .
62