From: Michael Gernoth Date: Tue, 8 Jun 2010 07:47:11 +0000 (+0200) Subject: make capabilities accessible from struct scope X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/commitdiff_plain/90e416c4df00269ab86d349ff677d0a2c0b0bd40 make capabilities accessible from struct scope --- 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. */