X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/blobdiff_plain/b131d433f9b984b50266298be6f0cf7f9a13b6fb..713be7a43ed11947c358fc67c11b9df7b0be204c:/rigol.c diff --git a/rigol.c b/rigol.c index 3386fbf..06ebacb 100644 --- a/rigol.c +++ b/rigol.c @@ -8,7 +8,6 @@ rmmod uhci_hcd; modprobe uhci_hcd (or alternately: use ohci_hcd) if that happens and you should be fine. */ -#include #include #include #include @@ -23,7 +22,7 @@ rmmod uhci_hcd; modprobe uhci_hcd #include #include -#include "usbtmc.h" +#include "scope.h" #include "commands.h" #define MIN(a,b) (((a)<(b))?(a):(b)) @@ -96,15 +95,15 @@ void child_reaper(int sig) int main(int argc, char **argv) { - struct usb_dev_handle *sc; + struct scope *sc; char *scpi; unsigned char *buff; int l; struct sigaction act; //Initialize scope - sc = usbtmc_initscope(); - usbtmc_claim(sc); + sc = initscope(); + claimscope(sc); buff = malloc (1024*1024); if (buff == NULL) { perror("malloc"); @@ -153,17 +152,17 @@ int main(int argc, char **argv) //printb (scpi, l+2); if (strchr (scpi, '?')) { //printf ("Expecting reply\n"); - l = usbtmc_sendscpi(sc, scpi, buff, 1024*1024); + l = sendscpi(sc, scpi, buff, 1024*1024); //printf ("Got replylen = %d.\n", l); buff[l] = 0; //zero-terminate printb (buff, l); } else { //printf ("No reply expected\n"); - l=usbtmc_sendscpi(sc,scpi,NULL,0); + l=sendscpi(sc,scpi,NULL,0); } free (scpi); } - usbtmc_release(sc); - usbtmc_close(sc); + releasescope(sc); + closescope(sc); return 0; }