From 13fe8b1dbc3d1f193b7ee90e1160e98da73e4edd Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Mon, 25 Nov 2002 19:13:41 +0000 Subject: [PATCH] add support for 611x adjustable calibration reference --- comedi/drivers/ni_mio_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 3de281ba..9b5a9d7c 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -1814,7 +1814,14 @@ static int ni_ai_insn_config(comedi_device *dev,comedi_subdevice *s, { if(data[1] >= 8) return -EINVAL; - devpriv->ai_calib_source = data[1]; + devpriv->ai_calib_source = data[1] & 0xf; + if( boardtype.reg_611x ) + { + unsigned int calib_source_adjust; + + calib_source_adjust = ( data[1] >> 4 ) & 0xff; + ni_writeb( calib_source_adjust, Cal_Gain_Select_611x ); + } return 2; } } -- 2.26.2