1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * comedi/drivers/amplc_dio.h
5 * Header for amplc_dio200.c, amplc_dio200_common.c and
8 * Copyright (C) 2005-2013 MEV Ltd. <https://www.mev.co.uk/>
10 * COMEDI - Linux Control and Measurement Device Interface
11 * Copyright (C) 1998,2000 David A. Schleef <ds@schleef.org>
14 #ifndef AMPLC_DIO200_H_INCLUDED
15 #define AMPLC_DIO200_H_INCLUDED
17 #include <linux/types.h>
24 enum dio200_sdtype { sd_none, sd_intr, sd_8255, sd_8254, sd_timer };
26 #define DIO200_MAX_SUBDEVS 8
27 #define DIO200_MAX_ISNS 6
31 unsigned char mainbar;
32 unsigned short n_subdevs; /* number of subdevices */
33 unsigned char sdtype[DIO200_MAX_SUBDEVS]; /* enum dio200_sdtype */
34 unsigned char sdinfo[DIO200_MAX_SUBDEVS]; /* depends on sdtype */
35 unsigned int has_int_sce:1; /* has interrupt enable/status reg */
36 unsigned int has_clk_gat_sce:1; /* has clock/gate selection registers */
37 unsigned int is_pcie:1; /* has enhanced features */
40 int amplc_dio200_common_attach(struct comedi_device *dev, unsigned int irq,
41 unsigned long req_irq_flags);
43 /* Used by initialization of PCIe boards. */
44 void amplc_dio200_set_enhance(struct comedi_device *dev, unsigned char val);