linux/drivers/comedi/drivers/das08.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * comedi/drivers/das08.c
 * comedi module for common DAS08 support (used by ISA/PCI/PCMCIA drivers)
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000 David A. Schleef <[email protected]>
 * Copyright (C) 2001,2002,2003 Frank Mori Hess <[email protected]>
 * Copyright (C) 2004 Salvador E. Tropea <[email protected]> <[email protected]>
 */

#include <linux/module.h>
#include <linux/comedi/comedidev.h>
#include <linux/comedi/comedi_8255.h>
#include <linux/comedi/comedi_8254.h>

#include "das08.h"

/*
 * Data format of DAS08_AI_LSB_REG and DAS08_AI_MSB_REG depends on
 * 'ai_encoding' member of board structure:
 *
 * das08_encode12     : DATA[11..4] = MSB[7..0], DATA[3..0] = LSB[7..4].
 * das08_pcm_encode12 : DATA[11..8] = MSB[3..0], DATA[7..9] = LSB[7..0].
 * das08_encode16     : SIGN = MSB[7], MAGNITUDE[14..8] = MSB[6..0],
 *                      MAGNITUDE[7..0] = LSB[7..0].
 *                      SIGN==0 for negative input, SIGN==1 for positive input.
 *                      Note: when read a second time after conversion
 *                            complete, MSB[7] is an "over-range" bit.
 */
#define DAS08_AI_LSB_REG
#define DAS08_AI_MSB_REG
#define DAS08_AI_TRIG_REG
#define DAS08_STATUS_REG
#define DAS08_STATUS_AI_BUSY
/*
 * The IRQ status bit is set to 1 by a rising edge on the external interrupt
 * input (which may be jumpered to the pacer output).  It is cleared by
 * setting the INTE control bit to 0.  Not present on "JR" boards.
 */
#define DAS08_STATUS_IRQ
/* digital inputs (not "JR" boards) */
#define DAS08_STATUS_DI(x)
#define DAS08_CONTROL_REG
/*
 * Note: The AI multiplexor channel can also be read from status register using
 * the same mask.
 */
#define DAS08_CONTROL_MUX_MASK
#define DAS08_CONTROL_MUX(x)
#define DAS08_CONTROL_INTE
#define DAS08_CONTROL_DO_MASK
/* digital outputs (not "JR" boards) */
#define DAS08_CONTROL_DO(x)
/*
 * (R/W) programmable AI gain ("PGx" and "AOx" boards):
 * + bits 3..0 (R/W) show/set the gain for the current AI mux channel
 * + bits 6..4 (R) show the current AI mux channel
 * + bit 7 (R) not unused
 */
#define DAS08_GAIN_REG

#define DAS08JR_DI_REG
#define DAS08JR_DO_REG
/* (W) analog output l.s.b. registers for 2 channels ("JR" boards) */
#define DAS08JR_AO_LSB_REG(x)
/* (W) analog output m.s.b. registers for 2 channels ("JR" boards) */
#define DAS08JR_AO_MSB_REG(x)
/*
 * (R) update analog outputs ("JR" boards set for simultaneous output)
 *     (same register as digital inputs)
 */
#define DAS08JR_AO_UPDATE_REG

/* (W) analog output l.s.b. registers for 2 channels ("AOx" boards) */
#define DAS08AOX_AO_LSB_REG(x)
/* (W) analog output m.s.b. registers for 2 channels ("AOx" boards) */
#define DAS08AOX_AO_MSB_REG(x)
/*
 * (R) update analog outputs ("AOx" boards set for simultaneous output)
 *     (any of the analog output registers could be used for this)
 */
#define DAS08AOX_AO_UPDATE_REG

/* gainlist same as _pgx_ below */

static const struct comedi_lrange das08_pgl_ai_range =;

static const struct comedi_lrange das08_pgh_ai_range =;

static const struct comedi_lrange das08_pgm_ai_range =;

static const struct comedi_lrange *const das08_ai_lranges[] =;

static const int das08_pgh_ai_gainlist[] =;
static const int das08_pgl_ai_gainlist[] =;
static const int das08_pgm_ai_gainlist[] =;

static const int *const das08_ai_gainlists[] =;

static int das08_ai_eoc(struct comedi_device *dev,
			struct comedi_subdevice *s,
			struct comedi_insn *insn,
			unsigned long context)
{}

static int das08_ai_insn_read(struct comedi_device *dev,
			      struct comedi_subdevice *s,
			      struct comedi_insn *insn, unsigned int *data)
{}

static int das08_di_insn_bits(struct comedi_device *dev,
			      struct comedi_subdevice *s,
			      struct comedi_insn *insn, unsigned int *data)
{}

static int das08_do_insn_bits(struct comedi_device *dev,
			      struct comedi_subdevice *s,
			      struct comedi_insn *insn, unsigned int *data)
{}

static int das08jr_di_insn_bits(struct comedi_device *dev,
				struct comedi_subdevice *s,
				struct comedi_insn *insn, unsigned int *data)
{}

static int das08jr_do_insn_bits(struct comedi_device *dev,
				struct comedi_subdevice *s,
				struct comedi_insn *insn, unsigned int *data)
{}

static void das08_ao_set_data(struct comedi_device *dev,
			      unsigned int chan, unsigned int data)
{}

static int das08_ao_insn_write(struct comedi_device *dev,
			       struct comedi_subdevice *s,
			       struct comedi_insn *insn,
			       unsigned int *data)
{}

int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
{}
EXPORT_SYMBOL_GPL();

static int __init das08_init(void)
{}
module_init();

static void __exit das08_exit(void)
{}
module_exit(das08_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();