make capabilities accessible from struct scope
authorMichael Gernoth <michael@gernoth.net>
Tue, 8 Jun 2010 07:47:11 +0000 (09:47 +0200)
committerMichael Gernoth <michael@gernoth.net>
Tue, 8 Jun 2010 07:47:11 +0000 (09:47 +0200)
scope.h
usbtmc.c

diff --git a/scope.h b/scope.h
index 1fdb515fe42a62741b9527472b0b993ae6477a09..9eafd91e7a658de72387bc7cce861f574df0bad1 100644 (file)
--- 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];
 };
index 332cbda8f192f85a4b1ec5f5dad88b4db5bb6d41..e1366ae8cd8b2082eb7aebb9d5f8945b1bd5a81c 100644 (file)
--- 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. */
Impressum, Datenschutz