This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.
/* TODO: How to compute the checksum? Hardware seems to ignore it. */
/* Request reading. */
- written = serial_write(serial, &cmdout, sizeof(cmdout));
+ written = serial_write_blocking(serial, &cmdout, sizeof(cmdout));
if (written != sizeof(cmdout))
return SR_ERR;