X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzketech-ebd-usb%2Fprotocol.c;h=b3098c5d529d607936fbf94048e73e24accc485e;hb=24a953382c4c07f4071a36897bf17c93db9ce1e7;hp=3a7fc5467eebab1fe92281d2603981e760a3c75c;hpb=d4b3f44fa798d1cc080bf59809ae03ac3642723a;p=libsigrok.git diff --git a/src/hardware/zketech-ebd-usb/protocol.c b/src/hardware/zketech-ebd-usb/protocol.c index 3a7fc546..b3098c5d 100644 --- a/src/hardware/zketech-ebd-usb/protocol.c +++ b/src/hardware/zketech-ebd-usb/protocol.c @@ -30,7 +30,7 @@ static void log_buf(const char *message, uint8_t buf[], size_t count) buffer[count * 2] = 0; - sr_dbg("%s: %s [%lu bytes]", message, buffer, count); + sr_dbg("%s: %s [%zu bytes]", message, buffer, count); } /* Send a command to the device. */ @@ -224,9 +224,7 @@ SR_PRIV int ebd_receive_data(int fd, int revents, void *cb_data) sr_dbg("Current limit %f", current_limit); /* Begin frame. */ - packet.type = SR_DF_FRAME_BEGIN; - packet.payload = NULL; - sr_session_send(sdi, &packet); + std_session_send_df_frame_begin(sdi); sr_analog_init(&analog, &encoding, &meaning, &spec, 4); @@ -257,9 +255,7 @@ SR_PRIV int ebd_receive_data(int fd, int revents, void *cb_data) g_slist_free(l); /* End frame. */ - packet.type = SR_DF_FRAME_END; - packet.payload = NULL; - sr_session_send(sdi, &packet); + std_session_send_df_frame_end(sdi); sr_sw_limits_update_samples_read(&devc->limits, 1); if (sr_sw_limits_check(&devc->limits))