]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/fs9922.c
SR_DF_ANALOG_OLD and sr_datafeed_analog_old renames.
[libsigrok.git] / src / dmm / fs9922.c
index caaa51c708d46b418245ff62a286afe292f3d675..5325e6dd50478874c30cb910d5e29f0c798714e5 100644 (file)
  * Fortune Semiconductor FS9922-DMM3/FS9922-DMM4 protocol parser.
  */
 
+#include <config.h>
 #include <string.h>
 #include <ctype.h>
 #include <math.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
 #define LOG_PREFIX "fs9922"
@@ -112,7 +113,9 @@ static int parse_value(const uint8_t *buf, float *result)
        } else if (!isdigit(buf[1]) || !isdigit(buf[2]) ||
                   !isdigit(buf[3]) || !isdigit(buf[4])) {
                sr_dbg("Value contained invalid digits: %02x %02x %02x %02x ("
-                      "%c %c %c %c).", buf[1], buf[2], buf[3], buf[4]);
+                       "%c %c %c %c).",
+                       buf[1], buf[2], buf[3], buf[4],
+                       buf[1], buf[2], buf[3], buf[4]);
                return SR_ERR;
        }
        intval = 0;
@@ -220,7 +223,7 @@ static void parse_flags(const uint8_t *buf, struct fs9922_info *info)
        /* Byte 13: Always '\n' (newline, 0x0a, 10) */
 }
 
-static void handle_flags(struct sr_datafeed_analog *analog, float *floatval,
+static void handle_flags(struct sr_datafeed_analog_old *analog, float *floatval,
                         const struct fs9922_info *info)
 {
        /* Factors */
@@ -341,7 +344,7 @@ SR_PRIV gboolean sr_fs9922_packet_valid(const uint8_t *buf)
  * @param buf Buffer containing the protocol packet. Must not be NULL.
  * @param floatval Pointer to a float variable. That variable will contain the
  *                 result value upon parsing success. Must not be NULL.
- * @param analog Pointer to a struct sr_datafeed_analog. The struct will be
+ * @param analog Pointer to a struct sr_datafeed_analog_old. The struct will be
  *               filled with data according to the protocol packet.
  *               Must not be NULL.
  * @param info Pointer to a struct fs9922_info. The struct will be filled
@@ -351,7 +354,7 @@ SR_PRIV gboolean sr_fs9922_packet_valid(const uint8_t *buf)
  *         'analog' variable contents are undefined and should not be used.
  */
 SR_PRIV int sr_fs9922_parse(const uint8_t *buf, float *floatval,
-                           struct sr_datafeed_analog *analog, void *info)
+                           struct sr_datafeed_analog_old *analog, void *info)
 {
        int ret;
        struct fs9922_info *info_local;
@@ -369,7 +372,7 @@ SR_PRIV int sr_fs9922_parse(const uint8_t *buf, float *floatval,
        return SR_OK;
 }
 
-SR_PRIV void sr_fs9922_z1_diode(struct sr_datafeed_analog *analog, void *info)
+SR_PRIV void sr_fs9922_z1_diode(struct sr_datafeed_analog_old *analog, void *info)
 {
        struct fs9922_info *info_local;