1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * das08.h
4 *
5 * Header for common DAS08 support (used by ISA/PCI/PCMCIA drivers)
6 *
7 * Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
8 */
9
10#ifndef _DAS08_H
11#define _DAS08_H
12
13#include <linux/types.h>
14
15struct comedi_device;
16
17/* different ways ai data is encoded in first two registers */
18enum das08_ai_encoding { das08_encode12, das08_encode16, das08_pcm_encode12 };
19/* types of ai range table used by different boards */
20enum das08_lrange {
21 das08_pg_none, das08_bipolar5, das08_pgh, das08_pgl, das08_pgm
22};
23
24struct das08_board_struct {
25 const char *name;
26 bool is_jr; /* true for 'JR' boards */
27 unsigned int ai_nbits;
28 enum das08_lrange ai_pg;
29 enum das08_ai_encoding ai_encoding;
30 unsigned int ao_nbits;
31 unsigned int di_nchan;
32 unsigned int do_nchan;
33 unsigned int i8255_offset;
34 unsigned int i8254_offset;
35 unsigned int iosize; /* number of ioports used */
36};
37
38struct das08_private_struct {
39 /* bits for do/mux register on boards without separate do register */
40 unsigned int do_mux_bits;
41 const unsigned int *pg_gainlist;
42};
43
44int das08_common_attach(struct comedi_device *dev, unsigned long iobase);
45
46#endif /* _DAS08_H */
47

source code of linux/drivers/comedi/drivers/das08.h