struct scpi_serial {
struct sr_serial_dev_inst *serial;
- char got_newline;
+ gboolean got_newline;
};
static const struct {
if (serial_flush(serial) != SR_OK)
return SR_ERR;
- sscpi->got_newline = 0;
+ sscpi->got_newline = FALSE;
return SR_OK;
}
static int scpi_serial_read_begin(void *priv)
{
struct scpi_serial *sscpi = priv;
- sscpi->got_newline = 0;
+ sscpi->got_newline = FALSE;
return SR_OK;
}
sr_spew("Read %d bytes into buffer.", ret);
if (buf[ret - 1] == '\n') {
- sscpi->got_newline = 1;
+ sscpi->got_newline = TRUE;
sr_spew("Received terminator");
} else {
- sscpi->got_newline = 0;
+ sscpi->got_newline = FALSE;
}
}