]>
cvs.zerfleddert.de Git - rigol/blob - usbtmc.h
1fa1046009aa2f791e6019983b6e339a9d001966
4 unsigned char bTagInverse
;
5 unsigned char Reserved3
;
7 unsigned char bmTransferAttributes
;
8 unsigned char TermChar
; /* Only in REQUEST_DEV_DEP_MSG_IN */
9 unsigned char Reverved10
;
10 unsigned char Reverved11
;
12 } __attribute__ ((__packed__
));
14 struct usbtmc_capabilities
{
15 unsigned char USBTMC_status
;
16 unsigned char Reserved1
;
17 unsigned char bcdUSBTMC
[2];
18 unsigned char USBTMCIFcapabilities
;
19 unsigned char USBTMCDEVcapabilities
;
20 unsigned char Reserved6
[6];
21 unsigned char bcdUSB488
[2];
22 unsigned char USB488IFcapabilities
;
23 unsigned char USB488DEVcapabilities
;
24 unsigned char Reserved16
[8];
25 } __attribute__ ((__packed__
));
27 #define USBTMC_DEV_DEP_MSG_OUT 0x1
28 #define USBTMC_REQUEST_DEV_DEP_MSG_IN 0x2
29 #define USBTMC_DEV_DEP_MSG_IN 0x2
31 #define USBTMC_TRANSFERATTRIB_EOM (1<<0)
32 #define USBTMC_TRANSFERATTRIB_TERMCHAR (1<<1)
34 #define USBTMC_CTL_INITIATE_ABORT_BO 0x01
35 #define USBTMC_CTL_CHECK_ABORT_BO_STAT 0x02
36 #define USBTMC_CTL_INITIATE_ABORT_BI 0x03
37 #define USBTMC_CTL_CHECK_ABORT_BI_STAT 0x04
38 #define USBTMC_CTL_INITIATE_CLEAR 0x05
39 #define USBTMC_CTL_CHECK_CLEAR_STAT 0x06
40 #define USBTMC_CTL_GET_CAPABILITIES 0x07
41 #define USBTMC_CTL_INDICATOR_PULSE 0x40
42 #define USB488_CTL_READ_STATUS_BYTE 0x80
43 #define USB488_CTL_REN_CONTROL 0xa0
44 #define USB488_CTL_GO_TO_LOCAL 0xa1
45 #define USB488_CTL_LOCAL_LOCKOUT 0xa2
47 #define USBTMC_CAP_IF_INDICATOR_PULSE (1<<2)
48 #define USBTMC_CAP_IF_TALKONLY (1<<1)
49 #define USBTMC_CAP_IF_LISTENONLY (1<<0)
50 #define USBTMC_CAP_DEV_TERMCHAR_SUPP (1<<0)
51 #define USB488_CAP_IF_4882 (1<<2)
52 #define USB488_CAP_IF_LOCKOUT (1<<1)
53 #define USB488_CAP_IF_TRIGGER (1<<0)
54 #define USB488_CAP_DEV_SCPI (1<<3)
55 #define USB488_CAP_DEV_SR1 (1<<2)
56 #define USB488_CAP_DEV_RL1 (1<<1)
57 #define USB488_CAP_DEV_DT1 (1<<0)
59 int usbtmc_sendscpi(struct scope
*sc
, char* cmd
, unsigned char *resp
, int resplen
);
60 struct scope
* usbtmc_initscope(void);
61 void usbtmc_close(struct scope
*sc
);
62 void usbtmc_claim(struct scope
*sc
);
63 void usbtmc_release(struct scope
*sc
);