include stdint.h
[rigol] / usbtmc.h
1 struct usbtmc_header {
2 unsigned char MsgID;
3 unsigned char bTag;
4 unsigned char bTagInverse;
5 unsigned char Reserved3;
6 uint32_t TransferSize;
7 unsigned char bmTransferAttributes;
8 unsigned char TermChar; /* Only in REQUEST_DEV_DEP_MSG_IN */
9 unsigned char Reverved10;
10 unsigned char Reverved11;
11 } __attribute__ ((__packed__));
12
13 #define USBTMC_DEV_DEP_MSG_OUT 0x1
14 #define USBTMC_REQUEST_DEV_DEP_MSG_IN 0x2
15 #define USBTMC_DEV_DEP_MSG_IN 0x2
16
17 #define USBTMC_TRANSFERATTRIB_EOM (1<<0)
18 #define USBTMC_TRANSFERATTRIB_TERMCHAR (1<<1)
19
20 int usbtmc_sendscpi(struct usb_dev_handle *dev, char* cmd, unsigned char *resp, int resplen);
21 struct usb_dev_handle* usbtmc_initscope(void);
22 void usbtmc_close(struct usb_dev_handle *sc);
23 void usbtmc_claim(struct usb_dev_handle *sc);
24 void usbtmc_release(struct usb_dev_handle *sc);
Impressum, Datenschutz