* @internal
*/
+#include <config.h>
#include "protocol.h"
/**
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;
}
* 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;
}