force gain calibration of 67xx calibration adc to 1
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 29 Feb 2004 21:48:21 +0000 (21:48 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 29 Feb 2004 21:48:21 +0000 (21:48 +0000)
comedi/drivers/ni_mio_common.c

index d89f16de9cafac04f3695d368398c800a6689c35..aee47e36f3fd160719a8ae791835d5146f24e115 100644 (file)
@@ -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));