]> sigrok.org Git - libsigrok.git/blobdiff - strutil.c
drivers: rename and reorganize config get/set
[libsigrok.git] / strutil.c
index 2c4d5c814e9503012a5a42d7ecddb66e4772c72a..a073a75800b2b26e7ad8e537fe8589bf827bff39 100644 (file)
--- a/strutil.c
+++ b/strutil.c
@@ -230,7 +230,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi,
                return NULL;
        }
 
-       if (sdi->driver->info_get(SR_DI_TRIGGER_TYPES,
+       if (sdi->driver->config_get(SR_DI_TRIGGER_TYPES,
                        (const void **)&trigger_types, sdi) != SR_OK) {
                sr_err("%s: Device doesn't support any triggers.", __func__);
                return NULL;
@@ -404,11 +404,11 @@ SR_API int sr_parse_period(const char *periodstr, struct sr_rational *r)
                while (*s == ' ')
                        s++;
                if (!strcmp(s, "fs"))
-                       r->q = 1000000000000000L;
+                       r->q = 1000000000000000ULL;
                else if (!strcmp(s, "ps"))
-                       r->q = 1000000000000L;
+                       r->q = 1000000000000ULL;
                else if (!strcmp(s, "ns"))
-                       r->q = 1000000000L;
+                       r->q = 1000000000ULL;
                else if (!strcmp(s, "us"))
                        r->q = 1000000;
                else if (!strcmp(s, "ms"))