]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/staging/comedi/drivers/das08.h
staging: comedi: das08: Support read-back of AO subdevice
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / comedi / drivers / das08.h
CommitLineData
0882eaa6
DS
1/*
2 das08.h
3
4 Header for das08.c and das08_cs.c
5
6 Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22*/
23
24#ifndef _DAS08_H
25#define _DAS08_H
26
4865a47f 27enum das08_bustype { isa, pci, pcmcia };
2696fb57 28/* different ways ai data is encoded in first two registers */
0882eaa6
DS
29enum das08_ai_encoding { das08_encode12, das08_encode16, das08_pcm_encode12 };
30enum das08_lrange { das08_pg_none, das08_bipolar5, das08_pgh, das08_pgl,
0a85b6f0
MT
31 das08_pgm
32};
0882eaa6 33
05d21f4a 34struct das08_board_struct {
0882eaa6 35 const char *name;
2696fb57 36 unsigned int id; /* id for pci/pcmcia boards */
0882eaa6 37 enum das08_bustype bustype;
1effe42d 38 bool is_jr; /* true for 'JR' boards */
0882eaa6
DS
39 unsigned int ai_nbits;
40 enum das08_lrange ai_pg;
41 enum das08_ai_encoding ai_encoding;
0882eaa6 42 unsigned int ao_nbits;
ffd76b32 43 unsigned int di_nchan;
0882eaa6
DS
44 unsigned int do_nchan;
45 unsigned int i8255_offset;
46 unsigned int i8254_offset;
2696fb57 47 unsigned int iosize; /* number of ioports used */
05d21f4a 48};
0882eaa6 49
0882eaa6 50struct das08_private_struct {
935e99fb 51 unsigned int do_mux_bits; /* bits for do/mux register on boards without separate do register */
2696fb57 52 unsigned int do_bits; /* bits for do register on boards with register dedicated to digital out only */
0882eaa6 53 const unsigned int *pg_gainlist;
2696fb57 54 struct pci_dev *pdev; /* struct for pci-das08 */
f0ba1d6e 55 unsigned int ao_readback[2]; /* assume 2 AO channels */
0882eaa6
DS
56};
57
da91b269 58int das08_common_attach(struct comedi_device *dev, unsigned long iobase);
484ecc95 59void das08_common_detach(struct comedi_device *dev);
0882eaa6
DS
60
61#endif /* _DAS08_H */