// SPDX-License-Identifier: GPL-2.0+ /* * ssv_dnp.c * generic comedi driver for SSV Embedded Systems' DIL/Net-PCs * Copyright (C) 2001 Robert Schwebel <[email protected]> * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2000 David A. Schleef <[email protected]> */ /* * Driver: ssv_dnp * Description: SSV Embedded Systems DIL/Net-PC * Author: Robert Schwebel <[email protected]> * Devices: [SSV Embedded Systems] DIL/Net-PC 1486 (dnp-1486) * Status: unknown */ /* include files ----------------------------------------------------------- */ #include <linux/module.h> #include <linux/comedi/comedidev.h> /* Some global definitions: the registers of the DNP ----------------------- */ /* */ /* For port A and B the mode register has bits corresponding to the output */ /* pins, where Bit-N = 0 -> input, Bit-N = 1 -> output. Note that bits */ /* 4 to 7 correspond to pin 0..3 for port C data register. Ensure that bits */ /* 0..3 remain unchanged! For details about Port C Mode Register see */ /* the remarks in dnp_insn_config() below. */ #define CSCIR … #define CSCDR … #define PAMR … #define PADR … #define PBMR … #define PBDR … #define PCMR … #define PCDR … static int dnp_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { … } static int dnp_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { … } static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it) { … } static void dnp_detach(struct comedi_device *dev) { … } static struct comedi_driver dnp_driver = …; module_comedi_driver(…); MODULE_AUTHOR(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;