]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hung-chang-dso-2100/protocol.c
Use std_session_send_df_trigger() where possible.
[libsigrok.git] / src / hardware / hung-chang-dso-2100 / protocol.c
index 160e5a0c63f1de492d9b45eb3b86f5c1837f51d9..3df5b3f291a2422ad1ddcd3996275b43358f8907 100644 (file)
@@ -396,12 +396,8 @@ static int read_subframe(const struct sr_dev_inst *sdi, uint8_t *buf)
                        if (interleave)
                                num *= 2;
                        if (!devc->step) {
-                               struct sr_datafeed_packet packet = {
-                                       .type = SR_DF_TRIGGER
-                               };
-
                                push_samples(sdi, buf, 6);
-                               sr_session_send(sdi, &packet);
+                               std_session_send_df_trigger(sdi);
                                buf += 6;
                                num -= 6;
                        }
@@ -420,7 +416,7 @@ static int read_subframe(const struct sr_dev_inst *sdi, uint8_t *buf)
 SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data)
 {
        struct sr_datafeed_packet packet = { .type = SR_DF_FRAME_BEGIN };
-       const struct sr_dev_inst *sdi;
+       struct sr_dev_inst *sdi;
        struct dev_context *devc;
        uint8_t state, buf[1000];
 
@@ -464,7 +460,7 @@ SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data)
        sr_session_send(sdi, &packet);
 
        if (++devc->frame >= devc->frame_limit)
-               hung_chang_dso_2100_dev_acquisition_stop(sdi);
+               sr_dev_acquisition_stop(sdi);
        else
                hung_chang_dso_2100_move_to(sdi, 0x21);