static const uint32_t devopts[] = {
SR_CONF_CONN | SR_CONF_GET,
- SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
- SR_CONF_NUM_VDIV | SR_CONF_GET,
SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET,
SR_CONF_LIMIT_MSEC | SR_CONF_GET | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_NUM_VDIV | SR_CONF_GET,
};
static const uint32_t devopts_cg[] = {
};
static const char *dc_coupling[] = {
- "DC", "DC",
+ "DC",
};
static const char *acdc_coupling[] = {
"Sainsmart", "DDS120", "fx2lafw-sainsmart-dds120.fw",
acdc_coupling, ARRAY_SIZE(acdc_coupling), TRUE,
},
+ {
+ 0x04b4, 0x602a, 0x1d50, 0x608e, 0x0003,
+ "Hantek", "6022BL", "fx2lafw-hantek-6022bl.fw",
+ dc_coupling, ARRAY_SIZE(dc_coupling), FALSE,
+ },
ALL_ZERO
};
}
devc->coupling_vals = prof->coupling_vals;
devc->coupling_tab_size = prof->coupling_tab_size;
+ devc->has_coupling = prof->has_coupling;
devc->sample_buf = NULL;
devc->sample_buf_write = 0;
*data = g_variant_new("(tt)", vdiv[0], vdiv[1]);
break;
case SR_CONF_COUPLING:
- *data = g_variant_new_string(devc->coupling_vals[devc->coupling[ch_idx]]);
+ *data = g_variant_new_string((devc->coupling[ch_idx] \
+ == COUPLING_DC) ? "DC" : "AC");
break;
}
}
devc = sdi->priv;
devc->dev_state = STOPPING;
- g_free(devc->sample_buf); devc->sample_buf = NULL;
+ g_free(devc->sample_buf);
+ devc->sample_buf = NULL;
return SR_OK;
}