]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/norma-dmm/api.c
drivers: Consistently use same indentation for config_*() API calls.
[libsigrok.git] / src / hardware / norma-dmm / api.c
index 719eac6bc65da78aec5b3cfe1d2c1012c743f697..86cbd9c3d2203bd7733a7559e6a4ae2c1508d858 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** @file
- *  Norma DM9x0/Siemens B102x DMMs driver.
- *  @internal
- */
-
 #include <config.h>
 #include "protocol.h"
 
@@ -30,8 +25,11 @@ static const uint32_t scanopts[] = {
        SR_CONF_SERIALCOMM,
 };
 
-static const uint32_t devopts[] = {
+static const uint32_t drvopts[] = {
        SR_CONF_MULTIMETER,
+};
+
+static const uint32_t devopts[] = {
        SR_CONF_CONTINUOUS,
        SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
        SR_CONF_LIMIT_MSEC | SR_CONF_SET,
@@ -161,8 +159,8 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
        return std_scan_complete(drv, devices);
 }
 
-static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_set(uint32_t key, GVariant *data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
        struct dev_context *devc;
 
@@ -173,10 +171,10 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        return sr_sw_limits_config_set(&devc->limits, key, data);
 }
 
-static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_channel_group *cg)
+static int config_list(uint32_t key, GVariant **data,
+       const struct sr_dev_inst *sdi, const struct sr_channel_group *cg)
 {
-       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, NULL, devopts);
+       return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
 }
 
 static int dev_acquisition_start(const struct sr_dev_inst *sdi)
@@ -189,7 +187,6 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
        sr_sw_limits_acquisition_start(&devc->limits);
        std_session_send_df_header(sdi);
 
-       /* Poll every 100ms, or whenever some data comes in. */
        serial = sdi->conn;
        serial_source_add(sdi->session, serial, G_IO_IN, 100,
                        norma_dmm_receive_data, (void *)sdi);