From: Gerhard Sittig Date: Wed, 22 Dec 2021 12:21:41 +0000 (+0100) Subject: input/stf: move trigger packet emission to feed queue (including flush) X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8a3b2b0d4bb6e705051811b350ecb868bfad48ab;p=libsigrok.git input/stf: move trigger packet emission to feed queue (including flush) Use the recently extended feed queue API which transparently flushes previously accumulated logic data before sending a trigger packet. --- diff --git a/src/input/stf.c b/src/input/stf.c index cbf93be4..431b0cbc 100644 --- a/src/input/stf.c +++ b/src/input/stf.c @@ -627,10 +627,9 @@ static void add_sample(const struct sr_input *in, uint16_t data, size_t count) unit_buffer, send_first); inc->submit.submit_count += send_first; inc->submit.samples_to_trigger -= send_first; - feed_queue_logic_flush(inc->submit.feed); sr_dbg("Trigger: sending DF packet, at %" PRIu64 ".", inc->submit.submit_count); - std_session_send_df_trigger(in->sdi); + feed_queue_logic_send_trigger(inc->submit.feed); } if (count) { (void)feed_queue_logic_submit(inc->submit.feed,