]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/kern-scale/api.c
scpi-pps: Add a missing "break" in config_get().
[libsigrok.git] / src / hardware / kern-scale / api.c
index 7b7d3d082093d170fe8a53553dcd311934b45477..e369a44cf5e585722dbec8acf544b8a90b8119e8 100644 (file)
@@ -82,7 +82,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        serial_flush(serial);
 
        sr_spew("Set O1 mode (continuous values, stable and unstable ones).");
-       if (serial_write_nonblocking(serial, "O1\r\n", 4) != 4)
+       if (serial_write_blocking(serial, "O1\r\n", 4, 0) < 0)
                goto scan_cleanup;
        /* Device replies with "A00\r\n" (OK) or "E01\r\n" (Error). Ignore. */
 
@@ -113,8 +113,8 @@ scan_cleanup:
        return std_scan_complete(di, devices);
 }
 
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
@@ -125,8 +125,8 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        return sr_sw_limits_config_set(&devc->limits, key, data);
 }
 
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }
@@ -140,7 +140,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        serial = sdi->conn;
 
        sr_spew("Set O1 mode (continuous values, stable and unstable ones).");
-       if (serial_write_nonblocking(serial, "O1\r\n", 4) != 4)
+       if (serial_write_blocking(serial, "O1\r\n", 4, 0) < 0)
                return SR_ERR;
        /* Device replies with "A00\r\n" (OK) or "E01\r\n" (Error). Ignore. */