]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fluke-dmm/api.c
Route sr_source_add for all serial devices through a serial_source_add wrapper.
[libsigrok.git] / hardware / fluke-dmm / api.c
index 4dd49c19c1525466c111f96a4e75f6e92cdf1e90..0e6c938a161d85c6d44cb304dc781ef5f1c5fd90 100644 (file)
@@ -233,10 +233,13 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
+static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
        struct dev_context *devc;
 
+       (void)probe_group;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -268,10 +271,11 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_probe_group *probe_group)
 {
-
        (void)sdi;
+       (void)probe_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -309,7 +313,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
 
        /* Poll every 100ms, or whenever some data comes in. */
        serial = sdi->conn;
-       sr_source_add(serial->fd, G_IO_IN, 50, fluke_receive_data, (void *)sdi);
+       serial_source_add(serial, G_IO_IN, 50, fluke_receive_data, (void *)sdi);
 
        if (serial_write(serial, "QM\r", 3) == -1) {
                sr_err("Unable to send QM: %s.", strerror(errno));