1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Header for ni_labpc ISA/PCMCIA/PCI drivers
5 * Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
11 enum transfer_type { fifo_not_empty_transfer, fifo_half_full_transfer,
15 struct labpc_boardinfo {
17 int ai_speed; /* maximum input speed in ns */
18 unsigned ai_scan_up:1; /* can auto scan up in ai channels */
19 unsigned has_ao:1; /* has analog outputs */
20 unsigned is_labpc1200:1; /* has extra regs compared to pc+ */
23 struct labpc_private {
24 struct comedi_isadma *dma;
25 struct comedi_8254 *counter;
27 /* number of data points left to be taken */
28 unsigned long long count;
29 /* software copys of bits written to command registers */
36 /* store last read of board status registers */
40 /* we are using dma/fifo-half-full/etc. */
41 enum transfer_type current_transfer;
43 * function pointers so we can use inb/outb or readb/writeb as
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);
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);
55 #endif /* _NI_LABPC_H */