#include <linux/module.h>
#include <linux/comedi/comedidev.h>
#include <linux/delay.h>
#define DT2801_TIMEOUT …
#define DT2801_MAX_DMA_SIZE …
#define DT_C_RESET …
#define DT_C_CLEAR_ERR …
#define DT_C_READ_ERRREG …
#define DT_C_SET_CLOCK …
#define DT_C_TEST …
#define DT_C_STOP …
#define DT_C_SET_DIGIN …
#define DT_C_SET_DIGOUT …
#define DT_C_READ_DIG …
#define DT_C_WRITE_DIG …
#define DT_C_WRITE_DAIM …
#define DT_C_SET_DA …
#define DT_C_WRITE_DA …
#define DT_C_READ_ADIM …
#define DT_C_SET_AD …
#define DT_C_READ_AD …
#define DT_MOD_DMA …
#define DT_MOD_CONT …
#define DT_MOD_EXTCLK …
#define DT_MOD_EXTTRIG …
#define DT_S_DATA_OUT_READY …
#define DT_S_DATA_IN_FULL …
#define DT_S_READY …
#define DT_S_COMMAND …
#define DT_S_COMPOSITE_ERROR …
#define DT2801_DATA …
#define DT2801_STATUS …
#define DT2801_CMD …
#if 0
static const struct comedi_lrange range_dt2801_ai_pgh_bipolar = {
4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25)
}
};
#endif
static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = …;
#if 0
static const struct comedi_lrange range_dt2801_ai_pgh_unipolar = {
4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(1.25)
}
};
#endif
static const struct comedi_lrange range_dt2801_ai_pgl_unipolar = …;
struct dt2801_board { … };
static const struct dt2801_board boardtypes[] = …;
struct dt2801_private { … };
static int dt2801_readdata(struct comedi_device *dev, int *data)
{ … }
static int dt2801_readdata2(struct comedi_device *dev, int *data)
{ … }
static int dt2801_writedata(struct comedi_device *dev, unsigned int data)
{ … }
static int dt2801_writedata2(struct comedi_device *dev, unsigned int data)
{ … }
static int dt2801_wait_for_ready(struct comedi_device *dev)
{ … }
static void dt2801_writecmd(struct comedi_device *dev, int command)
{ … }
static int dt2801_reset(struct comedi_device *dev)
{ … }
static int probe_number_of_ai_chans(struct comedi_device *dev)
{ … }
static const struct comedi_lrange *dac_range_table[] = …;
static const struct comedi_lrange *dac_range_lkup(int opt)
{ … }
static const struct comedi_lrange *ai_range_lkup(int type, int opt)
{ … }
static int dt2801_error(struct comedi_device *dev, int stat)
{ … }
static int dt2801_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{ … }
static int dt2801_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt2801_dio_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt2801_dio_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{ … }
static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ … }
static struct comedi_driver dt2801_driver = …;
module_comedi_driver(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;