]> sigrok.org Git - libsigrok.git/blobdiff - hardware/gmc-mh-1x-2x/api.c
Replace channel_group.probes with channel_group.channels.
[libsigrok.git] / hardware / gmc-mh-1x-2x / api.c
index 6b16c2ec6e1215066c507c7288dd964a25f2ecd9..e79bdbcf550bf2ce237783d1c45e30a5cc2cd46f 100644 (file)
@@ -393,16 +393,6 @@ static GSList *dev_list_2x_bd232(void)
                        ->instances;
 }
 
-static int dev_clear_1x_2x_rs232(void)
-{
-       return std_dev_clear(&gmc_mh_1x_2x_rs232_driver_info, NULL);
-}
-
-static int dev_clear_2x_bd232(void)
-{
-       return std_dev_clear(&gmc_mh_2x_bd232_driver_info, NULL);
-}
-
 static int dev_close(struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
@@ -423,28 +413,28 @@ static int dev_close(struct sr_dev_inst *sdi)
 
 static int cleanup_sm_rs232(void)
 {
-       return dev_clear_1x_2x_rs232();
+       return std_dev_clear(&gmc_mh_1x_2x_rs232_driver_info, NULL);
 }
 
 static int cleanup_2x_bd232(void)
 {
-       return dev_clear_2x_bd232();
+       return std_dev_clear(&gmc_mh_2x_bd232_driver_info, NULL);
 }
 
 /** Get value of configuration item */
 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 *channel_group)
 {
        int ret;
        struct dev_context *devc;
 
        (void)sdi;
        (void)data;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
@@ -470,10 +460,10 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 
 /** Implementation of config_list, auxiliary function for common parts, */
 static int config_list_common(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                             const struct sr_probe_group *probe_group)
+                             const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -489,10 +479,10 @@ static int config_list_common(int key, GVariant **data, const struct sr_dev_inst
 
 /** Implementation of config_list for Metrahit 1x/2x send mode */
 static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                         const struct sr_probe_group *probe_group)
+                         const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -500,7 +490,7 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd
                                                  hwcaps_sm, ARRAY_SIZE(hwcaps_sm), sizeof(int32_t));
                break;
        default:
-               return config_list_common(key, data, sdi, probe_group);
+               return config_list_common(key, data, sdi, channel_group);
        }
 
        return SR_OK;
@@ -508,10 +498,10 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd
 
 /** Implementation of config_list for Metrahit 2x bidirectional mode */
 static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                         const struct sr_probe_group *probe_group)
+                         const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -519,7 +509,7 @@ static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sd
                                                  hwcaps_bd, ARRAY_SIZE(hwcaps_bd), sizeof(int32_t));
                break;
        default:
-               return config_list_common(key, data, sdi, probe_group);
+               return config_list_common(key, data, sdi, channel_group);
        }
 
        return SR_OK;
@@ -608,7 +598,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info = {
        .cleanup = cleanup_sm_rs232,
        .scan = scan_1x_2x_rs232,
        .dev_list = dev_list_1x_2x_rs232,
-       .dev_clear = dev_clear_1x_2x_rs232,
+       .dev_clear = NULL,
        .config_get = config_get,
        .config_set = config_set,
        .config_list = config_list_sm,
@@ -627,7 +617,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info = {
        .cleanup = cleanup_2x_bd232,
        .scan = scan_2x_bd232,
        .dev_list = dev_list_2x_bd232,
-       .dev_clear = dev_clear_2x_bd232,
+       .dev_clear = NULL,
        .config_get = config_get,
        .config_set = config_set,
        .config_list = config_list_bd,