X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hwplugin.c;h=1fd9521473336ca900240ebd1086ceade71d57e7;hb=339729131d5acd50147e26ec238db569e273a459;hp=5cd6f6bb6f87086e1fcb673cf5176881b73a264d;hpb=49d0ce50d0e43c1a10dc2863afd20185051819aa;p=libsigrok.git diff --git a/hwplugin.c b/hwplugin.c index 5cd6f6bb..1fd95214 100644 --- a/hwplugin.c +++ b/hwplugin.c @@ -24,6 +24,7 @@ #include #include #include +#include "config.h" source_callback_add source_cb_add = NULL; source_callback_remove source_cb_remove = NULL; @@ -37,23 +38,40 @@ 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}, }; +#ifdef HAVE_LA_SALEAE_LOGIC extern struct device_plugin saleae_logic_plugin_info; +#endif +#ifdef HAVE_LA_OLS extern struct device_plugin ols_plugin_info; +#endif +#ifdef HAVE_LA_ZEROPLUS_LOGIC_CUBE extern struct device_plugin zeroplus_logic_cube_plugin_info; +#endif +#ifdef HAVE_LA_ASIX_SIGMA extern struct device_plugin asix_sigma_plugin_info; +#endif /* TODO: No linked list needed, this can be a simple array. */ int load_hwplugins(void) { +#ifdef HAVE_LA_SALEAE_LOGIC plugins = g_slist_append(plugins, (gpointer *)&saleae_logic_plugin_info); +#endif +#ifdef HAVE_LA_OLS plugins = g_slist_append(plugins, (gpointer *)&ols_plugin_info); +#endif +#ifdef HAVE_LA_ZEROPLUS_LOGIC_CUBE plugins = g_slist_append(plugins, (gpointer *)&zeroplus_logic_cube_plugin_info); +#endif +#ifdef HAVE_LA_ASIX_SIGMA plugins = g_slist_append(plugins, (gpointer *)&asix_sigma_plugin_info); +#endif return SIGROK_OK; }