1.\" Copyright (c) 1983, 1991 Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" from: @(#)ad.4 6.2 (Berkeley) 3/27/91 33.\" $Id: ad.4,v 1.2 1993/08/01 07:36:38 mycroft Exp $ 34.\" 35.Dd March 27, 1991 36.Dt AD 4 vax 37.Os BSD 4.2 38.Sh NAME 39.Nm ad 40.Nd Data Translation A/D converter 41.Sh SYNOPSIS 42.Cd "device ad0 at uba0 csr 0170400 vector adintr" 43.Sh DESCRIPTION 44The 45.Nm \&ad 46driver 47provides an interface to the Data Translation A/D converter. 48This is 49.Em not 50a real-time driver, but merely allows 51the user process to sample the board's channels one at a time. 52Each minor device selects a different 53.Tn A/D 54board. 55.Pp 56The driver communicates to a user process by means of 57.Xr ioctl 2 Ns s. 58The 59.Dv AD_CHAN 60.Xr ioctl 61selects which channel of the board to read. 62For example, 63.Bd -literal -offset indent 64chan = 5; 65ioctl(fd, AD_CHAN, &chan); 66.Ed 67.Pp 68selects channel 5. 69The 70.Dv AD_READ 71.Xr ioctl 2 72actually reads the data and returns it to the user 73process. 74An example is 75.Bd -literal -offset indent 76ioctl(fd, AD_READ, &data); 77.Ed 78.Sh FILES 79.Bl -tag -width /dev/adx -compact 80.It Pa /dev/ad 81.El 82.Sh DIAGNOSTICS 83None. 84.Sh HISTORY 85The 86.Nm 87driver appeared in 88.Bx 4.1 . 89