]> sigrok.org Git - libsigrok.git/blobdiff - hardware/openbench-logic-sniffer/ols.c
Use 'kHz' (not 'KHz') consistently.
[libsigrok.git] / hardware / openbench-logic-sniffer / ols.c
index 5742da195bccdf4c7d080b9d7796b811e9266d8d..e139e0d381a186ab7e2ffc8f96ff3dccfc51151c 100644 (file)
@@ -257,8 +257,8 @@ static int hw_init(char *deviceinfo)
                free(l->data);
        }
 
-       /* 2ms should do (enough time for 28 bytes to go over the bus). */
-       usleep(2000);
+       /* 2ms isn't enough for reliable transfer with pl2303, let's try 10 */
+       usleep(10000);
 
        final_devcnt = 0;
        g_poll(fds, devcnt, 1);
@@ -448,7 +448,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
        } else if (capability == HWCAP_PROBECONFIG) {
                ret = configure_probes((GSList *) value);
        } else if (capability == HWCAP_LIMIT_SAMPLES) {
-               limit_samples = strtoull(value, NULL, 10);
+               tmp_u64 = value;
+               limit_samples = *tmp_u64;
                ret = SIGROK_OK;
        } else if (capability == HWCAP_CAPTURE_RATIO) {
                capture_ratio = strtol(value, NULL, 10);