123318Smckusick /* 229207Smckusick * Copyright (c) 1982, 1986 Regents of the University of California. 323318Smckusick * All rights reserved. The Berkeley software License Agreement 423318Smckusick * specifies the terms and conditions for redistribution. 523318Smckusick * 6*33104Sbostic * @(#)adreg.h 7.2 (Berkeley) 12/22/87 723318Smckusick */ 87290Ssam 97290Ssam struct addevice { 107290Ssam short int ad_csr; /* Control status register */ 117290Ssam short int ad_data; /* Data buffer */ 127290Ssam }; 137290Ssam 147623Ssam #define AD_CHAN ADIOSCHAN 157623Ssam #define AD_READ ADIOGETW 16*33104Sbostic #define ADIOSCHAN _IOW('a', 0, int) /* set channel */ 17*33104Sbostic #define ADIOGETW _IOR('a', 1, int) /* read one word */ 187290Ssam 197290Ssam /* 207290Ssam * Unibus CSR register bits 217290Ssam */ 227290Ssam 237290Ssam #define AD_START 01 247290Ssam #define AD_SCHMITT 020 257290Ssam #define AD_CLOCK 040 267290Ssam #define AD_IENABLE 0100 277290Ssam #define AD_DONE 0200 287290Ssam #define AD_INCENABLE 040000 297290Ssam #define AD_ERROR 0100000 30