SR_CONF_LIMIT_SAMPLES,
SR_CONF_EXTERNAL_CLOCK,
SR_CONF_PATTERN_MODE,
+ SR_CONF_SWAP,
SR_CONF_RLE,
};
ret = SR_ERR;
}
break;
+ case SR_CONF_SWAP:
+ if (g_variant_get_boolean(data)) {
+ sr_info("Enabling channel swapping.");
+ devc->flag_reg |= FLAG_SWAP_PROBES;
+ } else {
+ sr_info("Disabling channel swapping.");
+ devc->flag_reg &= ~FLAG_SWAP_PROBES;
+ }
+ ret = SR_OK;
+ break;
+
case SR_CONF_RLE:
if (g_variant_get_boolean(data)) {
sr_info("Enabling RLE.");
}
sr_info("Setting samplerate to %" PRIu64 "Hz (divider %u, "
- "demux %s)", devc->cur_samplerate, devc->cur_samplerate_divider,
- devc->flag_reg & FLAG_DEMUX ? "on" : "off");
+ "demux %s, noise_filter %s)", devc->cur_samplerate,
+ devc->cur_samplerate_divider,
+ devc->flag_reg & FLAG_DEMUX ? "on" : "off",
+ devc->flag_reg & FLAG_FILTER ? "on": "off");
if (send_longcommand(serial, CMD_SET_DIVIDER,
reverse32(devc->cur_samplerate_divider)) != SR_OK)
return SR_ERR;
/* The flag register wants them here, and 1 means "disable channel". */
devc->flag_reg |= ~(changrp_mask << 2) & 0x3c;
- devc->flag_reg |= FLAG_FILTER;
devc->rle_count = 0;
data = (devc->flag_reg << 24) | ((devc->flag_reg << 8) & 0xff0000);
if (send_longcommand(serial, CMD_SET_FLAGS, data) != SR_OK)
/* Reset all operational states. */
devc->num_transfers = devc->num_samples = devc->num_bytes = 0;
+ memset(devc->sample, 0, 4);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, LOG_PREFIX);