]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lecroy-xstream/protocol.c
Use std_session_send_df_frame_begin()/_end() where possible.
[libsigrok.git] / src / hardware / lecroy-xstream / protocol.c
index 802cda32efe38f147387457c81ae1ee387eeeff9..9693c6d3404546c27ec4a216197cfb1f78e08146 100644 (file)
@@ -679,10 +679,8 @@ SR_PRIV int lecroy_xstream_receive_data(int fd, int revents, void *cb_data)
         * Send "frame begin" packet upon reception of data for the
         * first enabled channel.
         */
-       if (devc->current_channel == devc->enabled_channels) {
-               packet.type = SR_DF_FRAME_BEGIN;
-               sr_session_send(sdi, &packet);
-       }
+       if (devc->current_channel == devc->enabled_channels)
+               std_session_send_df_frame_begin(sdi);
 
        meaning.channels = g_slist_append(NULL, ch);
        packet.payload = &analog;
@@ -706,8 +704,7 @@ SR_PRIV int lecroy_xstream_receive_data(int fd, int revents, void *cb_data)
                return TRUE;
        }
 
-       packet.type = SR_DF_FRAME_END;
-       sr_session_send(sdi, &packet);
+       std_session_send_df_frame_end(sdi);
 
        /*
         * End of frame was reached. Stop acquisition after the specified