]>
git.zerfleddert.de Git - rigol/blob - scope.c
d6aff93bf9a81a71a383cbdd9703ce3674085920
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 void resetscope(struct scope
* sc
)
35 return usbtmc_reset(sc
);
38 struct scope
* initscope(void)
42 sc
= usbtmc_initscope();
45 printf("No scope found.\n");
50 sendscpi(sc
, "*IDN?", (unsigned char*)sc
->idn
, sizeof(sc
->idn
));
53 printf("Scope found (%s)\n", sc
->idn
);
58 char *scope_idn(struct scope
*sc
)