]> sigrok.org Git - libsigrok.git/commitdiff
use flexible sample limit specification (k/m/g)
authorBert Vermeulen <redacted>
Sat, 15 May 2010 21:30:17 +0000 (23:30 +0200)
committerBert Vermeulen <redacted>
Wed, 19 May 2010 19:34:22 +0000 (21:34 +0200)
HWCAP_LIMIT_SAMPLES is now passed to the driver as *uint64

hardware/openbench-logic-sniffer/ols.c
hardware/saleae-logic/saleae-logic.c
hardware/zeroplus-logic-cube/zeroplus.c

index f7c6bfe6c8255ba49756a8dc3992516c024855a0..e139e0d381a186ab7e2ffc8f96ff3dccfc51151c 100644 (file)
@@ -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);
index 2c09f8c44c6910be9a9f2e1fa404ed55a29a8832..07491fa085427889112e05bcb12b5e22a9773959 100644 (file)
@@ -511,7 +511,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 {
                ret = SIGROK_ERR;
index 58b2cc1d99a1dd08150dcab49fc068cf9de322a5..5f6ededb1c0192f89b138d2261f4ac94b90baa38 100644 (file)
@@ -472,7 +472,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
        case HWCAP_PROBECONFIG:
                return configure_probes((GSList *) value);
        case HWCAP_LIMIT_SAMPLES:
-               limit_samples = strtoull(value, NULL, 10);
+               tmp_u64 = value;
+               limit_samples = *tmp_u64;
                return SIGROK_OK;
        default:
                return SIGROK_ERR;