From: Bert Vermeulen Date: Sat, 15 May 2010 21:30:17 +0000 (+0200) Subject: use flexible sample limit specification (k/m/g) X-Git-Tag: libsigrok-0.1.0~496 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2458ea651409c8252d33dba5b5cfe9313f3e4899;p=libsigrok.git use flexible sample limit specification (k/m/g) HWCAP_LIMIT_SAMPLES is now passed to the driver as *uint64 --- diff --git a/hardware/openbench-logic-sniffer/ols.c b/hardware/openbench-logic-sniffer/ols.c index f7c6bfe6..e139e0d3 100644 --- a/hardware/openbench-logic-sniffer/ols.c +++ b/hardware/openbench-logic-sniffer/ols.c @@ -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); diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index 2c09f8c4..07491fa0 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -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; diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index 58b2cc1d..5f6ededb 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -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;