X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/blobdiff_plain/483a564bf0578b64b25c68ffabdfdc0fb9f0f2b7..adb5a679e9a34b10b262efe2c917619515a59f7b:/usbtmc.h diff --git a/usbtmc.h b/usbtmc.h index 1fa1046..97e7d12 100644 --- a/usbtmc.h +++ b/usbtmc.h @@ -56,8 +56,20 @@ struct usbtmc_capabilities { #define USB488_CAP_DEV_RL1 (1<<1) #define USB488_CAP_DEV_DT1 (1<<0) +#define USBTMC_STATUS_SUCCESS 0x01 +#define USBTMC_STATUS_PENDING 0x02 +#define USBTMC_STATUS_FAILED 0x80 +#define USBTMC_STATUS_TRANS_NIP 0x81 +#define USBTMC_STATUS_SPLIT_NIP 0x82 +#define USBTMC_STATUS_SPLIT_IP 0x83 + +#define USBTMC_STATUS_SUCC(x) (x == USBTMC_STATUS_SUCCESS) +#define USBTMC_STATUS_WARN(x) ((x > USBTMC_STATUS_SUCCESS) && (x < USBTMC_STATUS_FAILED)) +#define USBTMC_STATUS_FAIL(x) (x >= USBTMC_STATUS_FAILED) + int usbtmc_sendscpi(struct scope *sc, char* cmd, unsigned char *resp, int resplen); struct scope * usbtmc_initscope(void); void usbtmc_close(struct scope *sc); void usbtmc_claim(struct scope *sc); void usbtmc_release(struct scope *sc); +void usbtmc_reset(struct scope *sc);