devc->num_samples += analog.num_samples;
if (devc->limit_samples && devc->num_samples >= devc->limit_samples)
devc->num_samples += analog.num_samples;
if (devc->limit_samples && devc->num_samples >= devc->limit_samples)
* only thing to do is wait for the token that will confirm
* whether the command worked or not, and resend if needed. */
while (TRUE) {
* only thing to do is wait for the token that will confirm
* whether the command worked or not, and resend if needed. */
while (TRUE) {
- if (serial_write_nonblocking(serial, (const void *)&cmd, 1) != 1)
+ if (serial_write_blocking(serial, (const void *)&cmd, 1, 0) < 0)
- if (serial_write_nonblocking(serial, (const void *)&cmd, 1) != 1)
+ if (serial_write_blocking(serial, (const void *)&cmd, 1, 0) < 0)