From: Gerhard Sittig Date: Sun, 3 Jun 2018 14:49:45 +0000 (+0200) Subject: ols: use serial layer's "has receive data" query X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f992151332f79569feaa175f51cc4debabd271dd;p=libsigrok.git 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. --- diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 792549cb..4f9ee04f 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -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 {