1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _DAS08_H
25#define _DAS08_H
26
27enum das08_bustype { isa, pci, pcmcia, pc104 };
28
29enum das08_ai_encoding { das08_encode12, das08_encode16, das08_pcm_encode12 };
30enum das08_lrange { das08_pg_none, das08_bipolar5, das08_pgh, das08_pgl,
31 das08_pgm
32};
33
34struct das08_board_struct {
35 const char *name;
36 unsigned int id;
37 enum das08_bustype bustype;
38 void *ai;
39 unsigned int ai_nbits;
40 enum das08_lrange ai_pg;
41 enum das08_ai_encoding ai_encoding;
42 void *ao;
43 unsigned int ao_nbits;
44 void *di;
45 void *do_;
46 unsigned int do_nchan;
47 unsigned int i8255_offset;
48 unsigned int i8254_offset;
49 unsigned int iosize;
50};
51
52struct i8254_struct {
53 int channels;
54 int logic2phys[3];
55 int mode[3];
56 unsigned int iobase;
57};
58
59#define I8254_CNT0 0
60#define I8254_CNT1 1
61#define I8254_CNT2 2
62#define I8254_CTRL 3
63
64struct das08_private_struct {
65 unsigned int do_mux_bits;
66 unsigned int do_bits;
67 const unsigned int *pg_gainlist;
68 struct pci_dev *pdev;
69 unsigned int pci_iobase;
70 struct i8254_struct i8254;
71};
72
73#define NUM_DAS08_CS_BOARDS 2
74extern struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS];
75
76int das08_common_attach(struct comedi_device *dev, unsigned long iobase);
77void das08_common_detach(struct comedi_device *dev);
78
79#endif
80