]>
git.zerfleddert.de Git - rigol/blob - scope.c
c316ee527e3f021eb52c6130d958fe6f6b8b85e8
9 /* Just USB for now... */
10 int sendscpi(struct scope
* sc
, char* cmd
, unsigned char *resp
, int resplen
)
12 return usbtmc_sendscpi(sc
, cmd
, resp
, resplen
);
15 void closescope(struct scope
* sc
)
17 return usbtmc_close(sc
);
20 void claimscope(struct scope
* sc
)
22 return usbtmc_claim(sc
);
25 void releasescope(struct scope
* sc
)
27 /* Disable keylock, so the user doesn't have to press the 'force'-button */
28 sendscpi(sc
, ":KEY:LOCK DISABLE",NULL
,0);
29 return usbtmc_release(sc
);
32 void resetscope(struct scope
* sc
)
34 return usbtmc_reset(sc
);
37 struct scope
* initscope(void)
41 sc
= usbtmc_initscope();
44 printf("No scope found.\n");
49 sendscpi(sc
, "*IDN?", (unsigned char*)sc
->idn
, sizeof(sc
->idn
));
52 printf("Scope found (%s)\n", sc
->idn
);
57 char *scope_idn(struct scope
*sc
)