]> sigrok.org Git - libsigrok.git/commitdiff
input/stf: move trigger packet emission to feed queue (including flush)
authorGerhard Sittig <redacted>
Wed, 22 Dec 2021 12:21:41 +0000 (13:21 +0100)
committerGerhard Sittig <redacted>
Wed, 22 Dec 2021 19:04:28 +0000 (20:04 +0100)
Use the recently extended feed queue API which transparently flushes
previously accumulated logic data before sending a trigger packet.

src/input/stf.c

index cbf93be4aa9f1a612ad997ed85cd32e040a7ffdb..431b0cbc03893ba707cc3469d061d2f14bb72bdf 100644 (file)
@@ -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,