]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/testo/protocol.c
Constify a lot more items.
[libsigrok.git] / src / hardware / testo / protocol.c
index 46e9ae62baf6071233c1df660853e14081b8eefd..be36023f7bd56849b74e3b960cd78ba60a878af1 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <string.h>
 #include "protocol.h"
 
@@ -60,7 +61,7 @@ SR_PRIV int testo_probe_channels(struct sr_dev_inst *sdi)
        struct sr_usb_dev_inst *usb;
        int unit, packet_len, len, i;
        unsigned char packet[MAX_REPLY_SIZE], buf[MAX_REPLY_SIZE];
-       char *probe_name;
+       const char *probe_name;
 
        devc = sdi->priv;
        usb = sdi->conn;
@@ -81,7 +82,7 @@ SR_PRIV int testo_probe_channels(struct sr_dev_inst *sdi)
                return SR_ERR;
 
        packet_len = 0;
-       while(TRUE) {
+       while (TRUE) {
                if (libusb_bulk_transfer(usb->devhdl, EP_IN, buf, MAX_REPLY_SIZE,
                                &len, 250) < 0)
                        return SR_ERR;
@@ -222,7 +223,7 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
        struct sr_datafeed_packet packet;
-       struct sr_datafeed_analog analog;
+       struct sr_datafeed_analog_old analog;
        struct sr_channel *ch;
        GString *dbg;
        float value;
@@ -241,7 +242,7 @@ SR_PRIV void testo_receive_packet(const struct sr_dev_inst *sdi)
                g_string_free(dbg, TRUE);
        }
 
-       packet.type = SR_DF_ANALOG;
+       packet.type = SR_DF_ANALOG_OLD;
        packet.payload = &analog;
        analog.num_samples = 1;
        analog.mqflags = 0;