while( ( bit << 1 ) < setup->caldacs[dac].maxdata )
bit <<= 1;
- new_sv_init(&sv, setup->dev,0,chanspec);
+ new_sv_init(&sv, setup->dev, setup->ad_subdev, chanspec);
sv.settling_time_ns = setup->settling_time_ns;
x0 = 0;
update_caldac( setup, dac, x1 );
usleep(100000);
preobserve( setup, obs1);
- new_sv_init(&sv1, setup->dev,0,chanspec1);
+ new_sv_init(&sv1, setup->dev, setup->ad_subdev,chanspec1);
sv1.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv1);
y1 = sv1.average;
preobserve( setup, obs2);
- new_sv_init(&sv2, setup->dev,0,chanspec2);
+ new_sv_init(&sv2, setup->dev, setup->ad_subdev,chanspec2);
sv2.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv2);
y1 -= sv2.average;
update_caldac( setup, dac, x2 );
usleep(100000);
preobserve( setup, obs1);
- new_sv_init(&sv1, setup->dev,0,chanspec1);
+ new_sv_init(&sv1, setup->dev, setup->ad_subdev,chanspec1);
sv1.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv1);
y2 = sv1.average;
preobserve( setup, obs2);
- new_sv_init(&sv2, setup->dev,0,chanspec2);
+ new_sv_init(&sv2, setup->dev, setup->ad_subdev,chanspec2);
sv2.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv2);
y2 -= sv2.average;
usleep(100000);
preobserve( setup, obs1);
- new_sv_init(&sv1, setup->dev,0,chanspec1);
+ new_sv_init(&sv1, setup->dev, setup->ad_subdev,chanspec1);
sv1.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv1);
y = sv1.average;
preobserve( setup, obs2);
- new_sv_init(&sv2, setup->dev,0,chanspec2);
+ new_sv_init(&sv2, setup->dev, setup->ad_subdev,chanspec2);
sv2.settling_time_ns = setup->settling_time_ns;
new_sv_measure( setup->dev, &sv2);
y -= sv2.average;
orig = setup->caldacs[cdac].current;
- new_sv_init(&sv, setup->dev,0,ad_chanspec);
+ new_sv_init(&sv, setup->dev, setup->ad_subdev,ad_chanspec);
sv.settling_time_ns = setup->settling_time_ns;
update_caldac( setup, cdac, 0 );
orig = setup->caldacs[cdac].current;
- new_sv_init(&sv, setup->dev,0,ad_chanspec);
+ new_sv_init(&sv, setup->dev, setup->ad_subdev,ad_chanspec);
sv.settling_time_ns = setup->settling_time_ns;
update_caldac( setup, cdac, 0 );
new_sv_t sv;
char str[20];
- new_sv_init(&sv, setup->dev, 0,CR_PACK(adc,range,AREF_OTHER));
+ new_sv_init(&sv, setup->dev, setup->ad_subdev,CR_PACK(adc,range,AREF_OTHER));
sv.settling_time_ns = setup->settling_time_ns;
n=new_sv_measure( setup->dev, &sv);
int n;
new_sv_t sv;
- new_sv_init(&sv, setup->dev,0,CR_PACK(adc,range,AREF_OTHER));
+ new_sv_init(&sv, setup->dev, setup->ad_subdev,CR_PACK(adc,range,AREF_OTHER));
sv.settling_time_ns = setup->settling_time_ns;
n=new_sv_measure( setup->dev, &sv);