]> sigrok.org Git - libsigrok.git/blobdiff - hwplugin.c
Only build hardware drivers if they're enabled.
[libsigrok.git] / hwplugin.c
index 0dd8d75bfd351748e8958ac449704ae822af6704..4ae0088e1a41b991bcad86b2601c891aa0149dd7 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <glib.h>
 #include <sigrok.h>
+#include "config.h"
 
 source_callback_add source_cb_add = NULL;
 source_callback_remove source_cb_remove = NULL;
@@ -37,9 +38,11 @@ GSList *plugins;
  */
 struct hwcap_option hwcap_options[] = {
        {HWCAP_SAMPLERATE, T_UINT64, "Sample rate", "samplerate"},
+       {HWCAP_CAPTURE_RATIO, T_UINT64, "Pre-trigger capture ratio", "captureratio"},
        {0, 0, NULL, NULL},
 };
 
+extern struct device_plugin demo_plugin_info;
 #ifdef HAVE_LA_SALEAE_LOGIC
 extern struct device_plugin saleae_logic_plugin_info;
 #endif
@@ -56,6 +59,7 @@ extern struct device_plugin asix_sigma_plugin_info;
 /* TODO: No linked list needed, this can be a simple array. */
 int load_hwplugins(void)
 {
+       plugins = g_slist_append(plugins, (gpointer *)&demo_plugin_info);
 #ifdef HAVE_LA_SALEAE_LOGIC
        plugins =
            g_slist_append(plugins, (gpointer *)&saleae_logic_plugin_info);