From: Frank Mori Hess Date: Sun, 29 Feb 2004 21:48:21 +0000 (+0000) Subject: force gain calibration of 67xx calibration adc to 1 X-Git-Tag: r0_7_69~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=64f4f1a6456a7c839434df56194a2cdab008f596;p=comedi.git force gain calibration of 67xx calibration adc to 1 --- diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index d89f16de..aee47e36 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -3864,10 +3864,14 @@ static int init_cs5529(comedi_device *dev) { unsigned int config_bits = CSCFG_PORT_MODE | CSCFG_WORD_RATE_2180_CYCLES; + /* force gain calibration to 1 */ + cs5529_config_write(dev, 0x400000, CSCMD_GAIN_REGISTER); /* do self-calibration */ - cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET_GAIN, CSCMD_CONFIG_REGISTER); +// cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET_GAIN, CSCMD_CONFIG_REGISTER); + cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET, CSCMD_CONFIG_REGISTER); /* need to force a conversion for calibration to run */ cs5529_do_conversion(dev, NULL); + if(0) { rt_printk("config: 0x%x\n", cs5529_config_read(dev, CSCMD_CONFIG_REGISTER));