]>
git.zerfleddert.de Git - rigol/blob - scope.c
d2bae1324d3bfe42a67d46f491febc0c07ec0e49
10 /* Just USB for now... */
11 int sendscpi(struct scope
* sc
, char* cmd
, unsigned char *resp
, int resplen
)
13 return usbtmc_sendscpi(sc
, cmd
, resp
, resplen
);
16 void closescope(struct scope
* sc
)
18 return usbtmc_close(sc
);
21 void claimscope(struct scope
* sc
)
23 return usbtmc_claim(sc
);
26 void releasescope(struct scope
* sc
)
28 //Disable keylock, so the user doesn't have to press the 'force'-button
29 sendscpi(sc
, ":KEY:LOCK DISABLE",NULL
,0);
30 return usbtmc_release(sc
);
33 struct scope
* initscope(void)
37 sc
= usbtmc_initscope();
40 printf("No scope found.\n");
45 sendscpi(sc
, "*IDN?", (unsigned char*)sc
->idn
, sizeof(sc
->idn
));
48 printf("Scope found (%s)\n", sc
->idn
);
53 char *scope_idn(struct scope
*sc
)