]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/conrad-digi-35-cpu/api.c
drivers: Drop unneeded or duplicate comments.
[libsigrok.git] / src / hardware / conrad-digi-35-cpu / api.c
index 60eb46c1932ec1402c36c9a1fceebd7e4e5eee70..141a3d9715eedd55d7d2903eafa780d6f35b8f9a 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/**
- * @file
- *
- * <em>Conrad DIGI 35 CPU</em> power supply driver
- *
- * @internal
- */
-
 #include <config.h>
 #include "protocol.h"
 
@@ -35,8 +27,11 @@ static const uint32_t scanopts[] = {
        SR_CONF_SERIALCOMM,
 };
 
-static const uint32_t devopts[] = {
+static const uint32_t drvopts[] = {
        SR_CONF_POWER_SUPPLY,
+};
+
+static const uint32_t devopts[] = {
        SR_CONF_VOLTAGE | SR_CONF_SET,
        SR_CONF_CURRENT | SR_CONF_SET,
        SR_CONF_OVER_CURRENT_PROTECTION_ENABLED | SR_CONF_SET,
@@ -136,23 +131,7 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
 static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
                const struct sr_channel_group *cg)
 {
-       (void)sdi;
-       (void)cg;
-
-       switch (key) {
-       case SR_CONF_SCAN_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t));
-               break;
-       case SR_CONF_DEVICE_OPTIONS:
-               *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
-                               devopts, ARRAY_SIZE(devopts), sizeof(uint32_t));
-               break;
-       default:
-               return SR_ERR_NA;
-       }
-
-       return SR_OK;
+       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }
 
 static struct sr_dev_driver conrad_digi_35_cpu_driver_info = {