[6] - Analog output 1 range configuration (same options) [7] - Analog output 2 range configuration (same options) [8] - Analog output 3 range configuration (same options) [9] - Analog output 4 range configuration (same options) [10] - Analog output 5 range configuration (same options) [11] - Analog output 6 range configuration (same options) [12] - Analog output 7 range configuration (same options) */ #include "../comedidev.h" #include <linux/ioport.h> #include <linux/delay.h> static const struct comedi_lrange range_dt2815_ao_32_current = {1, {RANGE_mA(0, 32)} }; static const struct comedi_lrange range_dt2815_ao_20_current = {1, {RANGE_mA(4, 20)} }; #define DT2815_SIZE 2 #define DT2815_DATA 0 #define DT2815_STATUS 1 static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it); static int dt2815_detach(struct comedi_device *dev); static struct comedi_driver driver_dt2815 = { .driver_name = "dt2815", .module = THIS_MODULE,
* +/-10V 0 20 to 22 23 * 1 14 to 16 17 * 4 to 20mA 0 21 to 22 25 * 1 15 to 16 19 * AC reference 0 In on pin 22 24 (2-quadrant) * In on pin 22 23 (4-quadrant) * 1 In on pin 16 18 (2-quadrant) * In on pin 16 17 (4-quadrant) */ static const struct comedi_lrange das02_ao_ranges = { 6, { UNI_RANGE(5), UNI_RANGE(10), BIP_RANGE(5), BIP_RANGE(10), RANGE_mA(4, 20), RANGE_ext(0, 1) } }; /* * Register I/O map */ #define DAC02_AO_LSB(x) (0x00 + ((x) * 2)) #define DAC02_AO_MSB(x) (0x01 + ((x) * 2)) static int dac02_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) {
#define PCL728_SIZE 8 #define PCL726_DAC0_HI 0 #define PCL726_DAC0_LO 1 #define PCL726_DO_HI 12 #define PCL726_DO_LO 13 #define PCL726_DI_HI 14 #define PCL726_DI_LO 15 #define PCL727_DO_HI 24 #define PCL727_DO_LO 25 #define PCL727_DI_HI 0 #define PCL727_DI_LO 1 static const struct comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} }; static const struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} }; static const struct comedi_lrange *const rangelist_726[] = { &range_unipolar5, &range_unipolar10, &range_bipolar5, &range_bipolar10, &range_4_20mA, &range_unknown }; static const struct comedi_lrange *const rangelist_727[] = { &range_unipolar5, &range_unipolar10, &range_bipolar5, &range_4_20mA }; static const struct comedi_lrange *const rangelist_728[] = {