forked from Ivasoft/DSView
Add RLE compress options under LA mode
This commit is contained in:
@@ -861,6 +861,12 @@ SR_PRIV int dsl_config_get(int id, GVariant **data, const struct sr_dev_inst *sd
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_uint64(devc->cur_samplerate);
|
||||
break;
|
||||
case SR_CONF_RLE_SUPPORT:
|
||||
if (!sdi)
|
||||
return SR_ERR;
|
||||
devc = sdi->priv;
|
||||
*data = g_variant_new_boolean(devc->rle_support);
|
||||
break;
|
||||
case SR_CONF_CLOCK_TYPE:
|
||||
if (!sdi)
|
||||
return SR_ERR;
|
||||
|
||||
@@ -333,6 +333,7 @@ struct DSL_context {
|
||||
gboolean clock_type;
|
||||
gboolean clock_edge;
|
||||
gboolean rle_mode;
|
||||
gboolean rle_support;
|
||||
gboolean instant;
|
||||
uint16_t op_mode;
|
||||
gboolean stream;
|
||||
|
||||
@@ -124,6 +124,7 @@ static const int32_t hwoptions[] = {
|
||||
SR_CONF_THRESHOLD,
|
||||
SR_CONF_FILTER,
|
||||
SR_CONF_MAX_HEIGHT,
|
||||
SR_CONF_RLE_SUPPORT,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
};
|
||||
@@ -134,6 +135,7 @@ static const int32_t hwoptions_pro[] = {
|
||||
SR_CONF_VTH,
|
||||
SR_CONF_FILTER,
|
||||
SR_CONF_MAX_HEIGHT,
|
||||
SR_CONF_RLE_SUPPORT,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
};
|
||||
@@ -145,6 +147,7 @@ static const int32_t sessions[] = {
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_SAMPLERATE,
|
||||
SR_CONF_LIMIT_SAMPLES,
|
||||
SR_CONF_RLE_SUPPORT,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
SR_CONF_THRESHOLD,
|
||||
@@ -163,6 +166,7 @@ static const int32_t sessions_pro[] = {
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
SR_CONF_SAMPLERATE,
|
||||
SR_CONF_LIMIT_SAMPLES,
|
||||
SR_CONF_RLE_SUPPORT,
|
||||
SR_CONF_CLOCK_TYPE,
|
||||
SR_CONF_CLOCK_EDGE,
|
||||
SR_CONF_VTH,
|
||||
@@ -864,6 +868,8 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
|
||||
|
||||
if (id == SR_CONF_CLOCK_TYPE) {
|
||||
devc->clock_type = g_variant_get_boolean(data);
|
||||
} else if (id == SR_CONF_RLE_SUPPORT) {
|
||||
devc->rle_support = g_variant_get_boolean(data);
|
||||
} else if (id == SR_CONF_CLOCK_EDGE) {
|
||||
devc->clock_edge = g_variant_get_boolean(data);
|
||||
} else if (id == SR_CONF_LIMIT_SAMPLES) {
|
||||
|
||||
@@ -108,6 +108,8 @@ static struct sr_config_info sr_config_info_data[] = {
|
||||
"Threshold Level", "Threshold Level", NULL},
|
||||
{SR_CONF_VTH, SR_T_FLOAT, "threshold",
|
||||
"Threshold Level", "Threshold Level", NULL},
|
||||
{SR_CONF_RLE_SUPPORT, SR_T_BOOL, "rle",
|
||||
"Enable RLE Compress", "Enable RLE Compress", NULL},
|
||||
|
||||
{SR_CONF_PROBE_COUPLING, SR_T_CHAR, "coupling",
|
||||
"Coupling", "Coupling", NULL},
|
||||
|
||||
@@ -874,6 +874,9 @@ enum {
|
||||
/** Device channel mode */
|
||||
SR_CONF_CHANNEL_MODE,
|
||||
|
||||
/** RLE compress support */
|
||||
SR_CONF_RLE_SUPPORT,
|
||||
|
||||
/** Signal max height **/
|
||||
SR_CONF_MAX_HEIGHT,
|
||||
SR_CONF_MAX_HEIGHT_VALUE,
|
||||
|
||||
Reference in New Issue
Block a user