From 90e416c4df00269ab86d349ff677d0a2c0b0bd40 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Tue, 8 Jun 2010 09:47:11 +0200 Subject: [PATCH] make capabilities accessible from struct scope --- scope.h | 1 + usbtmc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scope.h b/scope.h index 1fdb515..9eafd91 100644 --- a/scope.h +++ b/scope.h @@ -6,6 +6,7 @@ struct scope { unsigned int wMaxPacketSize_in; unsigned char bTag; int brokenRigol; + struct usbtmc_capabilities *cap; } usb; char idn[128]; }; diff --git a/usbtmc.c b/usbtmc.c index 332cbda..e1366ae 100644 --- a/usbtmc.c +++ b/usbtmc.c @@ -285,7 +285,7 @@ struct scope* usbtmc_initscope(void) { } usbtmc_claim(sc); - usbtmc_get_capabilities(sc); + sc->usb.cap = usbtmc_get_capabilities(sc); printf("Device status: 0x%x\n", usbtmc_status(sc)); /* The following code isn't really necessary, the program works OK without it too. */ -- 2.39.5