]> sigrok.org Git - libsigrok.git/blobdiff - hwdriver.c
chronovu-la8: Adjust to GVariant-based sr_config_* functions
[libsigrok.git] / hwdriver.c
index 4635f3c4b7ace23bd64b39b295197e3d3d1becbf..25d92b68a9d7b95543820e7624750e7e663ab120 100644 (file)
@@ -61,6 +61,8 @@ static struct sr_config_info sr_config_info_data[] = {
                "Pre-trigger capture ratio", NULL},
        {SR_CONF_PATTERN_MODE, SR_T_CHAR, "pattern",
                "Pattern generator mode", NULL},
+       {SR_CONF_TRIGGER_TYPE, SR_T_CHAR, "triggertype",
+               "Trigger types", NULL},
        {SR_CONF_RLE, SR_T_BOOL, "rle",
                "Run Length Encoding", NULL},
        {SR_CONF_TRIGGER_SLOPE, SR_T_UINT64, "triggerslope",
@@ -368,6 +370,19 @@ SR_PRIV struct sr_config *sr_config_new(int key, GVariant *data)
        return src;
 }
 
+SR_PRIV void sr_config_free(struct sr_config *src)
+{
+
+       if (!src || !src->data) {
+               sr_err("%s: invalid data!", __func__);
+               return;
+       }
+
+       g_variant_unref(src->data);
+       g_free(src);
+
+}
+
 /**
  * Returns information about the given driver or device instance.
  *