* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
#include "config.h"
#include "dso.h"
#include <string.h>
#include <libusb.h>
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)
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;
*/
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;