2 * Header for ni_labpc ISA/PCMCIA/PCI drivers
4 * Copyright (C) 2003 Frank Mori Hess <fmhess@users.sourceforge.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
20 enum transfer_type { fifo_not_empty_transfer, fifo_half_full_transfer,
24 struct labpc_boardinfo {
26 int ai_speed; /* maximum input speed in ns */
27 unsigned ai_scan_up:1; /* can auto scan up in ai channels */
28 unsigned has_ao:1; /* has analog outputs */
29 unsigned is_labpc1200:1; /* has extra regs compared to pc+ */
32 struct labpc_private {
33 struct comedi_isadma *dma;
34 struct comedi_8254 *counter;
36 /* number of data points left to be taken */
37 unsigned long long count;
38 /* software copys of bits written to command registers */
45 /* store last read of board status registers */
49 /* we are using dma/fifo-half-full/etc. */
50 enum transfer_type current_transfer;
52 * function pointers so we can use inb/outb or readb/writeb as
55 unsigned int (*read_byte)(struct comedi_device *dev, unsigned long reg);
56 void (*write_byte)(struct comedi_device *dev,
57 unsigned int byte, unsigned long reg);
60 int labpc_common_attach(struct comedi_device *dev,
61 unsigned int irq, unsigned long isr_flags);
62 void labpc_common_detach(struct comedi_device *dev);
64 #endif /* _NI_LABPC_H */