void releasescope(struct scope* sc)
{
- //Disable keylock, so the user doesn't have to press the 'force'-button
+ /* Disable keylock, so the user doesn't have to press the 'force'-button */
sendscpi(sc, ":KEY:LOCK DISABLE",NULL,0);
return usbtmc_release(sc);
}
+void resetscope(struct scope* sc)
+{
+ return usbtmc_reset(sc);
+}
+
struct scope* initscope(void)
{
struct scope *sc;
void closescope(struct scope* sc);
void claimscope(struct scope* sc);
void releasescope(struct scope* sc);
+void resetscope(struct scope* sc);
char *scope_idn(struct scope *sc);
return &res;
}
+void usbtmc_reset(struct scope *sc)
+{
+ usb_reset(sc->usb.dev);
+ usbtmc_claim(sc);
+}
+
static void usbtmc_clear(struct scope *sc)
{
int r;
if ((r != 1) || status[0] != USBTMC_STATUS_SUCCESS) {
printf("INITIATE_CLEAR failed (0x%x): %s\n", status[0], usb_strerror());
- usb_reset(sc->usb.dev);
- usbtmc_claim(sc);
+ usbtmc_reset(sc);
return;
}
void usbtmc_close(struct scope *sc);
void usbtmc_claim(struct scope *sc);
void usbtmc_release(struct scope *sc);
+void usbtmc_reset(struct scope *sc);