From b5852599cddee48dbeb6e2e85eef5fa8ffe44454 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 28 Aug 2001 15:26:09 +0000 Subject: [PATCH] changed configuration of input/output ranges to use microvolts instead of volts so fractional voltages can be specified --- Documentation/comedi/drivers.txt | 8 ++++---- comedi/drivers/das16.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/comedi/drivers.txt b/Documentation/comedi/drivers.txt index 690e668f..121ca50c 100644 --- a/Documentation/comedi/drivers.txt +++ b/Documentation/comedi/drivers.txt @@ -282,12 +282,12 @@ Options: [2] - dma (optional) [3] - master clock speed in MHz (optional, 1 or 10, ignored if board can probe clock, defaults to 1) - [4] - analog input range lowest voltage (optional, only useful if your + [4] - analog input range lowest voltage in microvolts (optional, only useful if your board does not have software programmable gain) - [5] - analog input range highest voltage (optional, only useful if your + [5] - analog input range highest voltage in microvolts (optional, only useful if your board does not have software programmable gain) - [6] - analog output range lowest voltage (optional) - [7] - analog output range highest voltage (optional) + [6] - analog output range lowest voltage in microvolts (optional) + [7] - analog output range highest voltage in microvolts (optional) Passing a zero for an option is the same as leaving it unspecified. diff --git a/comedi/drivers/das16.c b/comedi/drivers/das16.c index c9c3677b..ce633750 100644 --- a/comedi/drivers/das16.c +++ b/comedi/drivers/das16.c @@ -31,12 +31,12 @@ Options: [2] - dma (optional) [3] - master clock speed in MHz (optional, 1 or 10, ignored if board can probe clock speed, defaults to 1 otherwise) - [4] - analog input range lowest voltage (optional, only useful if your + [4] - analog input range lowest in microvolts (optional, only useful if your board does not have software programmable gain) - [5] - analog input range highest voltage (optional, only useful if your + [5] - analog input range highest in microvolts (optional, only useful if your board does not have software programmable gain) - [6] - analog output range lowest voltage (optional) - [7] - analog output range highest voltage (optional) + [6] - analog output range lowest in microvolts (optional) + [7] - analog output range highest in microvolts (optional) Both an irq line and dma channel are required for timed or externally triggered conversions. @@ -1337,8 +1337,8 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) // initialize ai range devpriv->user_ao_range_table->length = 1; user_ai_range = devpriv->user_ai_range_table->range; - user_ai_range->min = it->options[4] * 1e6; - user_ai_range->max = it->options[5] * 1e6; + user_ai_range->min = it->options[4]; + user_ai_range->max = it->options[5]; user_ai_range->flags = UNIT_volt; } // get any user-defined output range @@ -1350,8 +1350,8 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) // initialize ao range devpriv->user_ai_range_table->length = 1; user_ao_range = devpriv->user_ao_range_table->range; - user_ao_range->min = it->options[6] * 1e6; - user_ao_range->max = it->options[7] * 1e6; + user_ao_range->min = it->options[6]; + user_ao_range->max = it->options[7]; user_ao_range->flags = UNIT_volt; } -- 2.26.2