]> sigrok.org Git - libsigrok.git/commitdiff
Various cosmetics, whitespace, consistency fixes.
authorUwe Hermann <redacted>
Wed, 31 Jul 2013 11:09:48 +0000 (13:09 +0200)
committerUwe Hermann <redacted>
Wed, 31 Jul 2013 11:09:48 +0000 (13:09 +0200)
12 files changed:
hardware/agilent-dmm/agilent-dmm.h
hardware/agilent-dmm/sched.c
hardware/asix-sigma/asix-sigma.c
hardware/cem-dt-885x/api.c
hardware/cem-dt-885x/protocol.c
hardware/colead-slm/protocol.c
hardware/fluke-dmm/fluke-dmm.h
hardware/fluke-dmm/fluke.c
hardware/hantek-dso/dso.h
hardware/kecheng-kc-330b/api.c
hardware/lascar-el-usb/protocol.c
hardware/rigol-ds1xx2/protocol.c

index ec18c3dae42387d4a73dca0aa67b88ba575cefe6..43fed2406ef00c3409deb73eb4aca5d98b71336f 100644 (file)
@@ -17,9 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-
-#ifndef LIBSIGROK_AGILENT_DMM_H
-#define LIBSIGROK_AGILENT_DMM_H
+#ifndef LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H
+#define LIBSIGROK_HARDWARE_AGILENT_DMM_AGILENT_DMM_H
 
 /* Message logging helpers with subsystem-specific prefix string. */
 #define LOG_PREFIX "agilent-dmm: "
@@ -85,4 +84,4 @@ struct agdmm_recv {
 
 SR_PRIV int agdmm_receive_data(int fd, int revents, void *cb_data);
 
-#endif /* LIBSIGROK_AGILENT_DMM_H */
+#endif
index da15e4d9a3a3dd4519a73eefaf19372938c65e38..290a2e7aee6a3ae56e0c0e1bdf2d151a0d6d181b 100644 (file)
@@ -144,7 +144,7 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd)
                sr_err("Failed to send: %s.", strerror(errno));
                return SR_ERR;
        }
-       
+
        return SR_OK;
 }
 
index f542b536009b223f67b67f1dc5862f8388b01c38..52224271d32a689d6c1934d0eaa3cf827d711a9e 100644 (file)
@@ -383,7 +383,7 @@ static int bin2bitbang(const char *filename,
 static void clear_helper(void *priv)
 {
        struct dev_context *devc;
-       
+
        devc = priv;
 
        ftdi_deinit(&devc->ftdic);
index 8a9d69c4842e49af3b0316b363ac3cb4c08f1297..62001a5b8f98e8d9edd4636bab2193d2c822e869 100644 (file)
@@ -144,11 +144,7 @@ static GSList *scan(GSList *options)
 
 static GSList *dev_list(void)
 {
-       struct drv_context *drvc;
-
-       drvc = di->priv;
-
-       return drvc->instances;
+       return ((struct drv_context *)(di->priv))->instances;
 }
 
 static int dev_clear(void)
index 74531b1eee9dbfbda9ab9cd4f354331afbe609eb..3c2b866dcb2d0356b3f5887b42f37393c5fa28d3 100644 (file)
@@ -544,7 +544,6 @@ SR_PRIV int cem_dt_885x_weight_freq_get(const struct sr_dev_inst *sdi)
                        return SR_MQFLAG_SPL_FREQ_WEIGHT_C;
        } else
                return cur_setting;
-
 }
 
 SR_PRIV int cem_dt_885x_weight_freq_set(const struct sr_dev_inst *sdi, int freqw)
@@ -607,7 +606,6 @@ SR_PRIV int cem_dt_885x_weight_time_get(const struct sr_dev_inst *sdi)
                        return SR_MQFLAG_SPL_TIME_WEIGHT_S;
        } else
                return cur_setting;
-
 }
 
 SR_PRIV int cem_dt_885x_weight_time_set(const struct sr_dev_inst *sdi, int timew)
index 9a9d10c875bb8edac14dedd44cbdad0ec37b22fb..e10fc37e438b8dbf7f914faafa579fbd9160f031 100644 (file)
@@ -25,7 +25,6 @@
 #include <errno.h>
 #include <string.h>
 
-
 static void process_packet(const struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
@@ -232,4 +231,3 @@ SR_PRIV int colead_slm_receive_data(int fd, int revents, void *cb_data)
 
        return TRUE;
 }
-
index c28063919f61654215fe7d852f108ca3b427cc0a..f1ec8ce9bbbe221034f71f80ad47553bf1828ca4 100644 (file)
@@ -17,9 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-
-#ifndef LIBSIGROK_FLUKE_DMM_H
-#define LIBSIGROK_FLUKE_DMM_H
+#ifndef LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
+#define LIBSIGROK_HARDWARE_FLUKE_DMM_FLUKE_DMM_H
 
 /* Message logging helpers with subsystem-specific prefix string. */
 #define LOG_PREFIX "fluke-dmm: "
@@ -73,4 +72,4 @@ struct dev_context {
 
 SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data);
 
-#endif /* LIBSIGROK_FLUKE_DMM_H */
+#endif
index 848e03e545309d848a0b54094e5730201d8c8af7..d960228af2d63d11edc3b88269707630cab92155 100644 (file)
@@ -26,7 +26,6 @@
 #include "libsigrok-internal.h"
 #include "fluke-dmm.h"
 
-
 static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
                char **tokens)
 {
@@ -532,5 +531,3 @@ SR_PRIV int fluke_receive_data(int fd, int revents, void *cb_data)
 
        return TRUE;
 }
-
-
index 9ca0a900fc4d2d516cd20aa863fa967aa55e9b8f..2c4f4c391c625f14ba7d41827219a5fd1b5a631d 100644 (file)
@@ -19,8 +19,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_H
-#define LIBSIGROK_HARDWARE_HANTEK_DSO_H
+#ifndef LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H
+#define LIBSIGROK_HARDWARE_HANTEK_DSO_DSO_H
 
 /* Message logging helpers with subsystem-specific prefix string. */
 #define LOG_PREFIX "hantek-dso: "
@@ -76,8 +76,8 @@ enum dso_commands {
        CMD_GET_CAPTURESTATE,
        CMD_SET_VOLTAGE,
        /* unused */
-       cmdSetLogicalData,
-       cmdGetLogicalData,
+       CMD_SET_LOGICALDATA,
+       CMD_GET_LOGICALDATA,
 };
 
 /* Must match the coupling table. */
index 3b6544ac028bb87cc4f13ab1d61c24d2fc88dd34..02f4b0e01dab72f87981b0fe51511d771df87f61 100644 (file)
@@ -168,11 +168,7 @@ static GSList *scan(GSList *options)
 
 static GSList *dev_list(void)
 {
-       struct drv_context *drvc;
-
-       drvc = di->priv;
-
-       return drvc->instances;
+       return ((struct drv_context *)(di->priv))->instances;
 }
 
 static int dev_clear(void)
index 707a3b619e4c7aaa56516f994f06ffaa26e09c8c..3f9cbc88b65bdf3d5cdfdae31b144ae9fca18657 100644 (file)
@@ -658,4 +658,3 @@ SR_PRIV int lascar_stop_logging(const struct sr_dev_inst *sdi)
 
        return ret;
 }
-
index 942aecfd801efce77a3c4ee886c66ae57605a524..001d671b68de2072caad6e33dfcf477ab3de8465 100644 (file)
@@ -288,4 +288,3 @@ SR_PRIV int rigol_ds1xx2_get_dev_cfg(const struct sr_dev_inst *sdi)
 
        return SR_OK;
 }
-