]> sigrok.org Git - libsigrok.git/blobdiff - hardware/brymen-bm86x/api.c
Rename various *PROBE* macros to *CHANNEL*.
[libsigrok.git] / hardware / brymen-bm86x / api.c
index 9ab60dff8fa90d168bea9d3612ee58e3819dd45d..169721d4dfa6a4d13a2c4d26189489c35315e2a4 100644 (file)
@@ -48,7 +48,7 @@ static GSList *scan(GSList *options)
        struct sr_dev_inst *sdi;
        struct sr_usb_dev_inst *usb;
        struct sr_config *src;
-       struct sr_probe *probe;
+       struct sr_channel *ch;
        const char *conn;
 
        drvc = di->priv;
@@ -86,12 +86,12 @@ static GSList *scan(GSList *options)
 
                sdi->priv = devc;
                sdi->driver = di;
-               if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1")))
+               if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P1")))
                        return NULL;
-               sdi->probes = g_slist_append(sdi->probes, probe);
-               if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P2")))
+               sdi->channels = g_slist_append(sdi->channels, ch);
+               if (!(ch = sr_channel_new(0, SR_CHANNEL_ANALOG, TRUE, "P2")))
                        return NULL;
-               sdi->probes = g_slist_append(sdi->probes, probe);
+               sdi->channels = g_slist_append(sdi->channels, ch);
 
                sdi->inst_type = SR_INST_USB;
                sdi->conn = usb;
@@ -108,11 +108,6 @@ 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 dev_open(struct sr_dev_inst *sdi)
 {
        struct drv_context *drvc = di->priv;
@@ -184,15 +179,15 @@ static int dev_close(struct sr_dev_inst *sdi)
 
 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:
@@ -209,11 +204,11 @@ 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;
 
-       (void)probe_group;
+       (void)cg;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -240,10 +235,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:
@@ -305,7 +300,7 @@ SR_PRIV struct sr_dev_driver brymen_bm86x_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,