X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fprotocol.c;h=4b9da80258b0409adbafedaa432e53ad21e1f3cd;hb=f9197887e447bb7536e25f3cb24d175d97cd20bb;hp=751d2d261a3df742033922916fbb68557571808b;hpb=7237e91262251a138cf150f9fcfe7b05d0e5904b;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index 751d2d26..4b9da802 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -23,6 +23,7 @@ * @internal */ +#include #include #include #include "protocol.h" @@ -32,12 +33,12 @@ static void send_data(struct sr_dev_inst *sdi) { struct dev_context *devc; struct sr_datafeed_packet packet; - struct sr_datafeed_analog analog; + struct sr_datafeed_analog_old analog; int i; float data[MAX_CHANNELS]; devc = sdi->priv; - packet.type = SR_DF_ANALOG; + packet.type = SR_DF_ANALOG_OLD; packet.payload = &analog; analog.channels = sdi->channels; analog.num_samples = 1; @@ -193,9 +194,10 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data) return TRUE; if (devc->acq_req_pending) { - gint64 elapsed_us = g_get_monotonic_time() - devc->req_sent_at; + int64_t elapsed_us = g_get_monotonic_time() - devc->req_sent_at; if (elapsed_us > (REQ_TIMEOUT_MS * 1000)) { - sr_spew("Request timeout: req=%d t=%lldus", (int)devc->acq_req, elapsed_us); + sr_spew("Request timeout: req=%d t=%" PRIi64 "us", + (int)devc->acq_req, elapsed_us); devc->acq_req_pending = 0; } }