ols: add swap channels feature
Allow channel groups to be swapped. This is useful for demux at 200mhz with the unbuffered channels. Signed-off-by: Matt Ranostay <mranostay@gmail.com>
This commit is contained in:
parent
de52409982
commit
7b0a57fd1c
|
@ -34,6 +34,7 @@ static const int32_t hwcaps[] = {
|
|||
SR_CONF_LIMIT_SAMPLES,
|
||||
SR_CONF_EXTERNAL_CLOCK,
|
||||
SR_CONF_PATTERN_MODE,
|
||||
SR_CONF_SWAP,
|
||||
SR_CONF_RLE,
|
||||
};
|
||||
|
||||
|
@ -325,6 +326,17 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
|
|||
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.");
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#define FLAG_CLOCK_EXTERNAL 0x40
|
||||
#define FLAG_CLOCK_INVERTED 0x80
|
||||
#define FLAG_RLE 0x0100
|
||||
#define FLAG_SWAP_PROBES 0x0200
|
||||
#define FLAG_EXTERNAL_TEST_MODE 0x0400
|
||||
#define FLAG_INTERNAL_TEST_MODE 0x0800
|
||||
|
||||
|
|
|
@ -65,6 +65,8 @@ static struct sr_config_info sr_config_info_data[] = {
|
|||
"Trigger types", NULL},
|
||||
{SR_CONF_EXTERNAL_CLOCK, SR_T_BOOL, "external_clock",
|
||||
"External clock mode", NULL},
|
||||
{SR_CONF_SWAP, SR_T_BOOL, "swap",
|
||||
"Swap channel order", NULL},
|
||||
{SR_CONF_RLE, SR_T_BOOL, "rle",
|
||||
"Run Length Encoding", NULL},
|
||||
{SR_CONF_TRIGGER_SLOPE, SR_T_UINT64, "triggerslope",
|
||||
|
|
|
@ -631,6 +631,11 @@ enum {
|
|||
/** The devices supports using a external clock. */
|
||||
SR_CONF_EXTERNAL_CLOCK,
|
||||
|
||||
/** The device supports swapping channels. Typical this is between
|
||||
* buffered and unbuffered channels.
|
||||
*/
|
||||
SR_CONF_SWAP,
|
||||
|
||||
/** The device supports Run Length Encoding. */
|
||||
SR_CONF_RLE,
|
||||
|
||||
|
|
Loading…
Reference in New Issue