]> sigrok.org Git - libsigrok.git/blobdiff - hardware/appa-55ii/api.c
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / hardware / appa-55ii / api.c
index 18ed73975430e239fc68124da7f4f044a00d744b..667b1c97cb36747a93b3b0fe2b179145ef38ffdc 100644 (file)
@@ -52,7 +52,7 @@ static GSList *scan(GSList *options)
        struct dev_context *devc;
        struct sr_serial_dev_inst *serial;
        struct sr_dev_inst *sdi;
-       struct sr_probe *probe;
+       struct sr_channel *ch;
        struct sr_config *src;
        GSList *devices, *l;
        const char *conn, *serialcomm;
@@ -111,12 +111,12 @@ static GSList *scan(GSList *options)
        sdi->priv = devc;
        sdi->driver = di;
 
-       if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
+       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T1")))
                goto scan_cleanup;
-       sdi->probes = g_slist_append(sdi->probes, probe);
-       if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
+       sdi->channels = g_slist_append(sdi->channels, ch);
+       if (!(ch = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "T2")))
                goto scan_cleanup;
-       sdi->probes = g_slist_append(sdi->probes, probe);
+       sdi->channels = g_slist_append(sdi->channels, ch);
 
        drvc->instances = g_slist_append(drvc->instances, sdi);
        devices = g_slist_append(devices, sdi);
@@ -132,22 +132,17 @@ static GSList *dev_list(void)
        return ((struct drv_context *)(di->priv))->instances;
 }
 
-static int dev_clear(void)
-{
-       return std_dev_clear(di, NULL);
-}
-
 static int cleanup(void)
 {
-       return dev_clear();
+       return std_dev_clear(di, NULL);
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc = sdi->priv;
 
-       (void)probe_group;
+       (void)cg;
 
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
@@ -167,13 +162,13 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
        const char *tmp_str;
        unsigned int i;
 
-       (void)probe_group;
+       (void)cg;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -211,10 +206,10 @@ static int config_set(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)
+               const struct sr_channel_group *cg)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)cg;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -271,8 +266,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
 
 static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
 {
-       return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close,
-                       sdi->conn, LOG_PREFIX);
+       return std_serial_dev_acquisition_stop(sdi, cb_data,
+                       std_serial_dev_close, sdi->conn, LOG_PREFIX);
 }
 
 SR_PRIV struct sr_dev_driver appa_55ii_driver_info = {
@@ -283,7 +278,7 @@ SR_PRIV struct sr_dev_driver appa_55ii_driver_info = {
        .cleanup = cleanup,
        .scan = scan,
        .dev_list = dev_list,
-       .dev_clear = dev_clear,
+       .dev_clear = NULL,
        .config_get = config_get,
        .config_set = config_set,
        .config_list = config_list,
@@ -291,4 +286,5 @@ SR_PRIV struct sr_dev_driver appa_55ii_driver_info = {
        .dev_close = std_serial_dev_close,
        .dev_acquisition_start = dev_acquisition_start,
        .dev_acquisition_stop = dev_acquisition_stop,
+       .priv = NULL,
 };