]> sigrok.org Git - libsigrok.git/blobdiff - hardware/asix-sigma/asix-sigma.c
Consistently use 'cg' for channel group variables.
[libsigrok.git] / hardware / asix-sigma / asix-sigma.c
index f542b536009b223f67b67f1dc5862f8388b01c38..5b39f0a25a27c9f18f3b7fb6e122eee4c0238048 100644 (file)
@@ -383,7 +383,7 @@ static int bin2bitbang(const char *filename,
 static void clear_helper(void *priv)
 {
        struct dev_context *devc;
-       
+
        devc = priv;
 
        ftdi_deinit(&devc->ftdic);
@@ -744,10 +744,13 @@ static int cleanup(void)
        return dev_clear();
 }
 
-static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
+static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
+       (void)cg;
+
        switch (id) {
        case SR_CONF_SAMPLERATE:
                if (sdi) {
@@ -763,11 +766,14 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi)
        return SR_OK;
 }
 
-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_channel_group *cg)
 {
        struct dev_context *devc;
        int ret;
 
+       (void)cg;
+
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
@@ -794,12 +800,14 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi)
        return ret;
 }
 
-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_channel_group *cg)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
+       (void)cg;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -1053,7 +1061,7 @@ static int receive_data(int fd, int revents, void *cb_data)
 
                /* Find first ts. */
                if (devc->state.chunks_downloaded == 0) {
-                       devc->state.lastts = *(uint16_t *) buf - 1;
+                       devc->state.lastts = RL16(buf) - 1;
                        devc->state.lastsample = 0;
                }