1
2
3
4
5
6
7
8 #ifndef _NI_LABPC_H
9 #define _NI_LABPC_H
10
11 enum transfer_type { fifo_not_empty_transfer, fifo_half_full_transfer,
12 isa_dma_transfer
13 };
14
15 struct labpc_boardinfo {
16 const char *name;
17 int ai_speed;
18 unsigned ai_scan_up:1;
19 unsigned has_ao:1;
20 unsigned is_labpc1200:1;
21 };
22
23 struct labpc_private {
24 struct comedi_isadma *dma;
25 struct comedi_8254 *counter;
26
27
28 unsigned long long count;
29
30 unsigned int cmd1;
31 unsigned int cmd2;
32 unsigned int cmd3;
33 unsigned int cmd4;
34 unsigned int cmd5;
35 unsigned int cmd6;
36
37 unsigned int stat1;
38 unsigned int stat2;
39
40
41 enum transfer_type current_transfer;
42
43
44
45
46 unsigned int (*read_byte)(struct comedi_device *dev, unsigned long reg);
47 void (*write_byte)(struct comedi_device *dev,
48 unsigned int byte, unsigned long reg);
49 };
50
51 int labpc_common_attach(struct comedi_device *dev,
52 unsigned int irq, unsigned long isr_flags);
53 void labpc_common_detach(struct comedi_device *dev);
54
55 #endif