X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fcem-dt-885x%2Fapi.c;h=5ae4e37ca67b9a4b5ec918e8a8e18aefe0184bd9;hb=1a46cc62e2b528bcaeb1f8dc0c952a81b3bcba5c;hp=e58598f1eee038630ef8d313a9d2b028eb85b796;hpb=f3f19d1131025b68d29a11273b627c83d748e7ea;p=libsigrok.git diff --git a/src/hardware/cem-dt-885x/api.c b/src/hardware/cem-dt-885x/api.c index e58598f1..5ae4e37c 100644 --- a/src/hardware/cem-dt-885x/api.c +++ b/src/hardware/cem-dt-885x/api.c @@ -23,7 +23,7 @@ #define SERIALCOMM "9600/8n1" /* 23ms is the longest interval between tokens. */ -#define MAX_SCAN_TIME 25 * 1000 +#define MAX_SCAN_TIME_US (25 * 1000) static const uint32_t scanopts[] = { SR_CONF_CONN, @@ -104,7 +104,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) devices = NULL; drvc = di->priv; start = g_get_monotonic_time(); - while (g_get_monotonic_time() - start < MAX_SCAN_TIME) { + while (g_get_monotonic_time() - start < MAX_SCAN_TIME_US) { if (serial_read_nonblocking(serial, &c, 1) == 1 && c == 0xa5) { /* Found one. */ sdi = g_malloc0(sizeof(struct sr_dev_inst));