]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
hantek-6xxx: Initial driver implementation.
[libsigrok.git] / src / hardware / hantek-dso / api.c
index 7eef397a38b1ff986a22acd2aa76b39acdf3f41c..5fe431d5be7c468f219ce8b81b32431fbd1b88b9 100644 (file)
@@ -105,7 +105,7 @@ static const struct dso_profile dev_profiles[] = {
                "Hantek", "DSO-5200A",
                buffersizes_512k,
                "hantek-dso-5200A.fw" },
-       { 0, 0, 0, 0, 0, 0, 0, 0 },
+       ALL_ZERO
 };
 
 static const uint64_t timebases[][2] = {
@@ -428,7 +428,8 @@ static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *s
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
-       char str[128], *s;
+       char str[128];
+       const char *s;
        const uint64_t *vdiv;
        int ch_idx;
 
@@ -773,8 +774,8 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
 
        sdi = transfer->user_data;
        devc = sdi->priv;
-       sr_spew("receive_transfer(): status %d received %d bytes.",
-                  transfer->status, transfer->actual_length);
+       sr_spew("receive_transfer(): status %s received %d bytes.",
+               libusb_error_name(transfer->status), transfer->actual_length);
 
        if (transfer->actual_length == 0)
                /* Nothing to send to the bus. */