]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/atten-pps3xxx/protocol.c
libsigrok-internal.h: Remove unused prototypes
[libsigrok.git] / src / hardware / atten-pps3xxx / protocol.c
index 95137d2e9a8164e86041d5184129ab749173c75f..8e678a16867ea7024ec84c0e18a03cc6d00e64ce 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <string.h>
-#include <errno.h>
 #include "protocol.h"
 
 static void dump_packet(char *msg, uint8_t *packet)
@@ -83,10 +82,12 @@ static void handle_packet(const struct sr_dev_inst *sdi)
 
 SR_PRIV void send_packet(const struct sr_dev_inst *sdi, uint8_t *packet)
 {
+       struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
 
+       devc = sdi->priv;
        serial = sdi->conn;
-       if (serial_write_blocking(serial, packet, PACKET_SIZE) < PACKET_SIZE)
+       if (serial_write_blocking(serial, packet, PACKET_SIZE, devc->delay_ms) < PACKET_SIZE)
                sr_dbg("Failed to send packet.");
        dump_packet("sent", packet);
 }
@@ -162,4 +163,3 @@ SR_PRIV int atten_pps3xxx_receive_data(int fd, int revents, void *cb_data)
 
        return TRUE;
 }
-