X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fcem-dt-885x%2Fapi.c;h=70a28e58153de63ed5f4833edb5299ae065f2ebe;hb=aed4ad0beaf64062752039a13f9a95326aa1df87;hp=b77f471f17af35b9db7c090d9ad58e77dcbe85c2;hpb=5827f61b641cfd326a9cf2ea534eb4f9481a8187;p=libsigrok.git diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index b77f471f..70a28e58 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -97,16 +97,16 @@ static GSList *scan(GSList *options) if (!(serial = sr_serial_dev_inst_new(conn, SERIALCOMM))) return NULL; - if (serial_open(serial, SERIAL_RDONLY | SERIAL_NONBLOCK) != SR_OK) + if (serial_open(serial, SERIAL_RDONLY) != SR_OK) return NULL; devices = NULL; drvc = di->priv; start = g_get_monotonic_time(); while (g_get_monotonic_time() - start < MAX_SCAN_TIME) { - if (serial_read(serial, &c, 1) == 1 && c == 0xa5) { + if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) { /* Found one. */ - if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, "CEM", + if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "CEM", "DT-885x", NULL))) return NULL;