ols: use serial layer's "has receive data" query

Eliminate a direct libserialport dependency in the OLS device driver.
Use libsigrok's internal serial layer's API instead to check for the
availability of receive data.
This commit is contained in:
Gerhard Sittig 2018-06-03 16:49:45 +02:00 committed by Uwe Hermann
parent 8c3df6e5cd
commit f992151332
1 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
g_usleep(RESPONSE_DELAY_US);
if (sp_input_waiting(serial->sp_data) == 0) {
if (serial_has_receive_data(serial) == 0) {
sr_dbg("Didn't get any reply.");
return NULL;
}
@ -159,7 +159,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
g_usleep(RESPONSE_DELAY_US);
if (sp_input_waiting(serial->sp_data) != 0) {
if (serial_has_receive_data(serial) != 0) {
/* Got metadata. */
sdi = get_metadata(serial);
} else {