linux/drivers/comedi/drivers/ni_at_ao.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * ni_at_ao.c
 * Driver for NI AT-AO-6/10 boards
 *
 * COMEDI - Linux Control and Measurement Device Interface
 * Copyright (C) 2000,2002 David A. Schleef <[email protected]>
 */

/*
 * Driver: ni_at_ao
 * Description: National Instruments AT-AO-6/10
 * Devices: [National Instruments] AT-AO-6 (at-ao-6), AT-AO-10 (at-ao-10)
 * Status: should work
 * Author: David A. Schleef <[email protected]>
 * Updated: Sun Dec 26 12:26:28 EST 2004
 *
 * Configuration options:
 *   [0] - I/O port base address
 *   [1] - IRQ (unused)
 *   [2] - DMA (unused)
 *   [3] - analog output range, set by jumpers on hardware
 *         0 for -10 to 10V bipolar
 *         1 for 0V to 10V unipolar
 */

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

/*
 * Register map
 *
 * Register-level programming information can be found in NI
 * document 320379.pdf.
 */
#define ATAO_DIO_REG
#define ATAO_CFG2_REG
#define ATAO_CFG2_CALLD_NOP
#define ATAO_CFG2_CALLD(x)
#define ATAO_CFG2_FFRTEN
#define ATAO_CFG2_DACS(x)
#define ATAO_CFG2_LDAC(x)
#define ATAO_CFG2_PROMEN
#define ATAO_CFG2_SCLK
#define ATAO_CFG2_SDATA
#define ATAO_CFG3_REG
#define ATAO_CFG3_DMAMODE
#define ATAO_CFG3_CLKOUT
#define ATAO_CFG3_RCLKEN
#define ATAO_CFG3_DOUTEN2
#define ATAO_CFG3_DOUTEN1
#define ATAO_CFG3_EN2_5V
#define ATAO_CFG3_SCANEN
#define ATAO_82C53_BASE
#define ATAO_CFG1_REG
#define ATAO_CFG1_EXTINT2EN
#define ATAO_CFG1_EXTINT1EN
#define ATAO_CFG1_CNTINT2EN
#define ATAO_CFG1_CNTINT1EN
#define ATAO_CFG1_TCINTEN
#define ATAO_CFG1_CNT1SRC
#define ATAO_CFG1_CNT2SRC
#define ATAO_CFG1_FIFOEN
#define ATAO_CFG1_GRP2WR
#define ATAO_CFG1_EXTUPDEN
#define ATAO_CFG1_DMARQ
#define ATAO_CFG1_DMAEN
#define ATAO_CFG1_CH(x)
#define ATAO_STATUS_REG
#define ATAO_STATUS_FH
#define ATAO_STATUS_FE
#define ATAO_STATUS_FF
#define ATAO_STATUS_INT2
#define ATAO_STATUS_INT1
#define ATAO_STATUS_TCINT
#define ATAO_STATUS_PROMOUT
#define ATAO_FIFO_WRITE_REG
#define ATAO_FIFO_CLEAR_REG
#define ATAO_AO_REG(x)

/* registers with _2_ are accessed when GRP2WR is set in CFG1 */
#define ATAO_2_DMATCCLR_REG
#define ATAO_2_INT1CLR_REG
#define ATAO_2_INT2CLR_REG
#define ATAO_2_RTSISHFT_REG
#define ATAO_2_RTSISHFT_RSI
#define ATAO_2_RTSISTRB_REG

struct atao_board {};

static const struct atao_board atao_boards[] =;

struct atao_private {};

static void atao_select_reg_group(struct comedi_device *dev, int group)
{}

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

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

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

/*
 * There are three DAC8800 TrimDACs on the board. These are 8-channel,
 * 8-bit DACs that are used to calibrate the Analog Output channels.
 * The factory default calibration values are stored in the EEPROM.
 * The TrimDACs, and EEPROM addresses, are mapped as:
 *
 *        Channel       EEPROM  Description
 *   -----------------  ------  -----------------------------------
 *    0 - DAC0 Chan 0    0x30   AO Channel 0 Offset
 *    1 - DAC0 Chan 1    0x31   AO Channel 0 Gain
 *    2 - DAC0 Chan 2    0x32   AO Channel 1 Offset
 *    3 - DAC0 Chan 3    0x33   AO Channel 1 Gain
 *    4 - DAC0 Chan 4    0x34   AO Channel 2 Offset
 *    5 - DAC0 Chan 5    0x35   AO Channel 2 Gain
 *    6 - DAC0 Chan 6    0x36   AO Channel 3 Offset
 *    7 - DAC0 Chan 7    0x37   AO Channel 3 Gain
 *    8 - DAC1 Chan 0    0x38   AO Channel 4 Offset
 *    9 - DAC1 Chan 1    0x39   AO Channel 4 Gain
 *   10 - DAC1 Chan 2    0x3a   AO Channel 5 Offset
 *   11 - DAC1 Chan 3    0x3b   AO Channel 5 Gain
 *   12 - DAC1 Chan 4    0x3c   2.5V Offset
 *   13 - DAC1 Chan 5    0x3d   AO Channel 6 Offset (at-ao-10 only)
 *   14 - DAC1 Chan 6    0x3e   AO Channel 6 Gain   (at-ao-10 only)
 *   15 - DAC1 Chan 7    0x3f   AO Channel 7 Offset (at-ao-10 only)
 *   16 - DAC2 Chan 0    0x40   AO Channel 7 Gain   (at-ao-10 only)
 *   17 - DAC2 Chan 1    0x41   AO Channel 8 Offset (at-ao-10 only)
 *   18 - DAC2 Chan 2    0x42   AO Channel 8 Gain   (at-ao-10 only)
 *   19 - DAC2 Chan 3    0x43   AO Channel 9 Offset (at-ao-10 only)
 *   20 - DAC2 Chan 4    0x44   AO Channel 9 Gain   (at-ao-10 only)
 *        DAC2 Chan 5    0x45   Reserved
 *        DAC2 Chan 6    0x46   Reserved
 *        DAC2 Chan 7    0x47   Reserved
 */
static int atao_calib_insn_write(struct comedi_device *dev,
				 struct comedi_subdevice *s,
				 struct comedi_insn *insn,
				 unsigned int *data)
{}

static void atao_reset(struct comedi_device *dev)
{}

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

static struct comedi_driver ni_at_ao_driver =;
module_comedi_driver();

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