X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/blobdiff_plain/483a564bf0578b64b25c68ffabdfdc0fb9f0f2b7..07a45f0356f55c38f9d2bbbec36e742f43cdd3e1:/usbtmc.h diff --git a/usbtmc.h b/usbtmc.h index 1fa1046..3734ff5 100644 --- a/usbtmc.h +++ b/usbtmc.h @@ -56,6 +56,17 @@ 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);