X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=hardware%2Fhantek-dso%2Fdso.c;h=4eedf7987b905b70f61e1420c8914e3cb4acd5c1;hb=f8c617cf4c6b649d3456f1ca7082f6cfb6dac76d;hp=75832c8aa4e98806a9dd35dea971259c7714a4dd;hpb=e05a174be2f9142471ad94a1af2b3722efd9c6ae;p=libsigrok.git
diff --git a/hardware/hantek-dso/dso.c b/hardware/hantek-dso/dso.c
index 75832c8a..4eedf798 100644
--- a/hardware/hantek-dso/dso.c
+++ b/hardware/hantek-dso/dso.c
@@ -19,8 +19,8 @@
* along with this program. If not, see .
*/
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
#include "config.h"
#include "dso.h"
#include
@@ -28,7 +28,8 @@
#include
extern libusb_context *usb_context;
-extern GSList *dev_insts;
+extern struct sr_dev_driver hantek_dso_driver_info;
+static struct sr_dev_driver *hdi = &hantek_dso_driver_info;
static int send_begin(struct context *ctx)
@@ -112,7 +113,7 @@ SR_PRIV int dso_open(int dev_index)
struct context *ctx;
int err, skip, i;
- if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
+ if (!(sdi = sr_dev_inst_get(hdi->instances, dev_index)))
return SR_ERR_ARG;
ctx = sdi->priv;
@@ -672,7 +673,7 @@ SR_PRIV int dso_get_capturestate(struct context *ctx, uint8_t *capturestate,
*/
bitvalue = 1;
for (i = 0; i < 24; i++) {
- // Each set bit inverts all bits with a lower value
+ /* Each set bit inverts all bits with a lower value. */
if(toff & bitvalue)
toff ^= bitvalue - 1;
bitvalue <<= 1;