2
0
forked from Ivasoft/DSView

Able to set trig postion for demo

This commit is contained in:
dreamsourcelabTAI
2023-06-06 19:37:05 +08:00
parent f2418593f2
commit d3286303f6
3 changed files with 17 additions and 1 deletions

View File

@@ -884,6 +884,9 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
case SR_CONF_CHANNEL_MODE:
*data = g_variant_new_int16(vdev->logic_ch_mode);
break;
case SR_CONF_HORIZ_TRIGGERPOS:
*data = g_variant_new_byte(vdev->trigger_hrate);
break;
default:
return SR_ERR_NA;
}
@@ -1118,6 +1121,9 @@ static int config_set(int id, GVariant *data, struct sr_dev_inst *sdi,
}
break;
case SR_CONF_HORIZ_TRIGGERPOS:
vdev->trigger_hrate = g_variant_get_byte(data);
break;
default:
sr_err("Unknown capability: %d.", id);
return SR_ERR_NA;

View File

@@ -204,6 +204,7 @@ struct session_vdev
uint8_t max_height;
struct sr_status mstatus;
struct session_packet_buffer *packet_buffer;
uint8_t trigger_hrate; //dso trig position.
//time
uint64_t packet_len;