X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fhardware%2Fconrad-digi-35-cpu%2Fprotocol.c;h=78f7d1c34c0f7136db9396f374b590fd45c440de;hb=bfc34b9ab0302fa0ba98eef3ce1b35c76d378589;hp=8068574aa83b780212e83546db35fa7985e31650;hpb=7ce59a31334cdb9b12d9b1c166b542acf1899e00;p=libsigrok.git
diff --git a/src/hardware/conrad-digi-35-cpu/protocol.c b/src/hardware/conrad-digi-35-cpu/protocol.c
index 8068574a..78f7d1c3 100644
--- a/src/hardware/conrad-digi-35-cpu/protocol.c
+++ b/src/hardware/conrad-digi-35-cpu/protocol.c
@@ -17,12 +17,7 @@
* along with this program. If not, see .
*/
-/**
- * @file
- * Conrad DIGI 35 CPU power supply driver
- * @internal
- */
-
+#include
#include "protocol.h"
/**
@@ -48,7 +43,8 @@ SR_PRIV int send_msg1(const struct sr_dev_inst *sdi, char cmd, int param)
sr_spew("send_msg1(): %c%c%c%c\\r", buf[0], buf[1], buf[2], buf[3]);
- if (serial_write_blocking(serial, buf, sizeof(buf)) < (int)sizeof(buf)) {
+ if (serial_write_blocking(serial, buf, sizeof(buf),
+ serial_timeout(serial, sizeof(buf))) < (int)sizeof(buf)) {
sr_err("Write error for cmd=%c", cmd);
return SR_ERR;
}
@@ -57,7 +53,7 @@ SR_PRIV int send_msg1(const struct sr_dev_inst *sdi, char cmd, int param)
* Wait 50ms to ensure that the device does not swallow any of the
* following commands.
*/
- g_usleep(50000);
+ g_usleep(50 * 1000);
return SR_OK;
}