// SPDX-License-Identifier: GPL-2.0+ /* * pcmad.c * Hardware driver for Winsystems PCM-A/D12 and PCM-A/D16 * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2000,2001 David A. Schleef <[email protected]> */ /* * Driver: pcmad * Description: Winsystems PCM-A/D12, PCM-A/D16 * Devices: [Winsystems] PCM-A/D12 (pcmad12), PCM-A/D16 (pcmad16) * Author: ds * Status: untested * * This driver was written on a bet that I couldn't write a driver * in less than 2 hours. I won the bet, but never got paid. =( * * Configuration options: * [0] - I/O port base * [1] - IRQ (unused) * [2] - Analog input reference (must match jumpers) * 0 = single-ended (16 channels) * 1 = differential (8 channels) * [3] - Analog input encoding (must match jumpers) * 0 = straight binary (0-5V input range) * 1 = two's complement (+-10V input range) */ #include <linux/module.h> #include <linux/comedi/comedidev.h> #define PCMAD_STATUS … #define PCMAD_LSB … #define PCMAD_MSB … #define PCMAD_CONVERT … struct pcmad_board_struct { … }; static const struct pcmad_board_struct pcmad_boards[] = …; static int pcmad_ai_eoc(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned long context) { … } static int pcmad_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { … } static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) { … } static struct comedi_driver pcmad_driver = …; module_comedi_driver(…); MODULE_AUTHOR(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;