linux/drivers/comedi/drivers/s526.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * s526.c
 * Sensoray s526 Comedi driver
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000 David A. Schleef <[email protected]>
 */

/*
 * Driver: s526
 * Description: Sensoray 526 driver
 * Devices: [Sensoray] 526 (s526)
 * Author: Richie
 *	   Everett Wang <[email protected]>
 * Updated: Thu, 14 Sep. 2006
 * Status: experimental
 *
 * Encoder works
 * Analog input works
 * Analog output works
 * PWM output works
 * Commands are not supported yet.
 *
 * Configuration Options:
 *   [0] - I/O port base address
 */

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

/*
 * Register I/O map
 */
#define S526_TIMER_REG
#define S526_TIMER_LOAD(x)
#define S526_TIMER_MODE
#define S526_TIMER_MANUAL
#define S526_TIMER_AUTO
#define S526_TIMER_RESTART
#define S526_WDOG_REG
#define S526_WDOG_INVERTED
#define S526_WDOG_ENA
#define S526_WDOG_INTERVAL(x)
#define S526_AO_CTRL_REG
#define S526_AO_CTRL_RESET
#define S526_AO_CTRL_CHAN(x)
#define S526_AO_CTRL_START
#define S526_AI_CTRL_REG
#define S526_AI_CTRL_DELAY
#define S526_AI_CTRL_CONV(x)
#define S526_AI_CTRL_READ(x)
#define S526_AI_CTRL_START
#define S526_AO_REG
#define S526_AI_REG
#define S526_DIO_CTRL_REG
#define S526_DIO_CTRL_DIO3_NEG
#define S526_DIO_CTRL_DIO2_NEG
#define S526_DIO_CTRL_DIO1_NEG
#define S526_DIO_CTRL_DIO0_NEG
#define S526_DIO_CTRL_GRP2_OUT
#define S526_DIO_CTRL_GRP1_OUT
#define S526_DIO_CTRL_GRP2_NEG
#define S526_INT_ENA_REG
#define S526_INT_STATUS_REG
#define S526_INT_DIO(x)
#define S526_INT_EEPROM
#define S526_INT_CNTR(x)
#define S526_INT_AI
#define S526_INT_AO
#define S526_INT_TIMER
#define S526_MISC_REG
#define S526_MISC_LED_OFF
#define S526_GPCT_LSB_REG(x)
#define S526_GPCT_MSB_REG(x)
#define S526_GPCT_MODE_REG(x)
#define S526_GPCT_MODE_COUT_SRC(x)
#define S526_GPCT_MODE_COUT_SRC_MASK
#define S526_GPCT_MODE_COUT_SRC_RCAP
#define S526_GPCT_MODE_COUT_SRC_RTGL
#define S526_GPCT_MODE_COUT_POL(x)
#define S526_GPCT_MODE_COUT_POL_MASK
#define S526_GPCT_MODE_COUT_POL_NORM
#define S526_GPCT_MODE_COUT_POL_INV
#define S526_GPCT_MODE_AUTOLOAD(x)
#define S526_GPCT_MODE_AUTOLOAD_MASK
#define S526_GPCT_MODE_AUTOLOAD_NONE
/* these 3 bits can be OR'ed */
#define S526_GPCT_MODE_AUTOLOAD_RO
#define S526_GPCT_MODE_AUTOLOAD_IXFALL
#define S526_GPCT_MODE_AUTOLOAD_IXRISE
#define S526_GPCT_MODE_HWCTEN_SRC(x)
#define S526_GPCT_MODE_HWCTEN_SRC_MASK
#define S526_GPCT_MODE_HWCTEN_SRC_CEN
#define S526_GPCT_MODE_HWCTEN_SRC_IX
#define S526_GPCT_MODE_HWCTEN_SRC_IXRF
#define S526_GPCT_MODE_HWCTEN_SRC_NRCAP
#define S526_GPCT_MODE_CTEN_CTRL(x)
#define S526_GPCT_MODE_CTEN_CTRL_MASK
#define S526_GPCT_MODE_CTEN_CTRL_DIS
#define S526_GPCT_MODE_CTEN_CTRL_ENA
#define S526_GPCT_MODE_CTEN_CTRL_HW
#define S526_GPCT_MODE_CTEN_CTRL_INVHW
#define S526_GPCT_MODE_CLK_SRC(x)
#define S526_GPCT_MODE_CLK_SRC_MASK
/* if count direction control set to quadrature */
#define S526_GPCT_MODE_CLK_SRC_QUADX1
#define S526_GPCT_MODE_CLK_SRC_QUADX2
#define S526_GPCT_MODE_CLK_SRC_QUADX4
#define S526_GPCT_MODE_CLK_SRC_QUADX4_
/* if count direction control set to software control */
#define S526_GPCT_MODE_CLK_SRC_ARISE
#define S526_GPCT_MODE_CLK_SRC_AFALL
#define S526_GPCT_MODE_CLK_SRC_INT
#define S526_GPCT_MODE_CLK_SRC_INTHALF
#define S526_GPCT_MODE_CT_DIR(x)
#define S526_GPCT_MODE_CT_DIR_MASK
/* if count direction control set to software control */
#define S526_GPCT_MODE_CT_DIR_UP
#define S526_GPCT_MODE_CT_DIR_DOWN
#define S526_GPCT_MODE_CTDIR_CTRL(x)
#define S526_GPCT_MODE_CTDIR_CTRL_MASK
#define S526_GPCT_MODE_CTDIR_CTRL_QUAD
#define S526_GPCT_MODE_CTDIR_CTRL_SOFT
#define S526_GPCT_MODE_LATCH_CTRL(x)
#define S526_GPCT_MODE_LATCH_CTRL_MASK
#define S526_GPCT_MODE_LATCH_CTRL_READ
#define S526_GPCT_MODE_LATCH_CTRL_EVENT
#define S526_GPCT_MODE_PR_SELECT(x)
#define S526_GPCT_MODE_PR_SELECT_MASK
#define S526_GPCT_MODE_PR_SELECT_PR0
#define S526_GPCT_MODE_PR_SELECT_PR1
/* Control/Status - R = readable, W = writeable, C = write 1 to clear */
#define S526_GPCT_CTRL_REG(x)
#define S526_GPCT_CTRL_EV_STATUS(x)
#define S526_GPCT_CTRL_EV_STATUS_MASK
#define S526_GPCT_CTRL_EV_STATUS_NONE
/* these 4 bits can be OR'ed */
#define S526_GPCT_CTRL_EV_STATUS_ECAP
#define S526_GPCT_CTRL_EV_STATUS_ICAPN
#define S526_GPCT_CTRL_EV_STATUS_ICAPP
#define S526_GPCT_CTRL_EV_STATUS_RCAP
#define S526_GPCT_CTRL_COUT_STATUS
#define S526_GPCT_CTRL_INDEX_STATUS
#define S525_GPCT_CTRL_INTEN(x)
#define S525_GPCT_CTRL_INTEN_MASK
#define S525_GPCT_CTRL_INTEN_NONE
/* these 4 bits can be OR'ed */
#define S525_GPCT_CTRL_INTEN_ERROR
#define S525_GPCT_CTRL_INTEN_IXFALL
#define S525_GPCT_CTRL_INTEN_IXRISE
#define S525_GPCT_CTRL_INTEN_RO
#define S525_GPCT_CTRL_LATCH_SEL(x)
#define S525_GPCT_CTRL_LATCH_SEL_MASK
#define S525_GPCT_CTRL_LATCH_SEL_NONE
/* these 3 bits can be OR'ed */
#define S525_GPCT_CTRL_LATCH_SEL_IXFALL
#define S525_GPCT_CTRL_LATCH_SEL_IXRISE
#define S525_GPCT_CTRL_LATCH_SEL_ITIMER
#define S525_GPCT_CTRL_CT_ARM
#define S525_GPCT_CTRL_CT_LOAD
#define S526_GPCT_CTRL_CT_RESET
#define S526_EEPROM_DATA_REG
#define S526_EEPROM_CTRL_REG
#define S526_EEPROM_CTRL_ADDR(x)
#define S526_EEPROM_CTRL(x)
#define S526_EEPROM_CTRL_READ
#define S526_EEPROM_CTRL_START

struct s526_private {};

static void s526_gpct_write(struct comedi_device *dev,
			    unsigned int chan, unsigned int val)
{}

static unsigned int s526_gpct_read(struct comedi_device *dev,
				   unsigned int chan)
{}

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

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

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

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

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

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

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

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

static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{}

static struct comedi_driver s526_driver =;
module_comedi_driver();

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