28#ifndef _TUSB_USBTMC_H__
29#define _TUSB_USBTMC_H__
31#include "common/tusb_common.h"
45#define USBTMC_VERSION 0x0100
46#define USBTMC_488_VERSION 0x0100
49 USBTMC_MSGID_DEV_DEP_MSG_OUT = 1u,
50 USBTMC_MSGID_DEV_DEP_MSG_IN = 2u,
51 USBTMC_MSGID_VENDOR_SPECIFIC_MSG_OUT = 126u,
52 USBTMC_MSGID_VENDOR_SPECIFIC_IN = 127u,
53 USBTMC_MSGID_USB488_TRIGGER = 128u,
78 unsigned int EOM : 1 ;
79 } bmTransferAttributes;
93 } bmTransferAttributes;
110 } bmTransferAttributes;
155 USBTMC_BULK_IN_ERR_INCOMPLETE_HEADER = 1u,
156 USBTMC_BULK_IN_ERR_UNSUPPORTED = 2u,
157 USBTMC_BULK_IN_ERR_BAD_PARAMETER = 3u,
158 USBTMC_BULK_IN_ERR_DATA_TOO_SHORT = 4u,
159 USBTMC_BULK_IN_ERR_DATA_TOO_LONG = 5u,
163 USBTMC_BULK_IN_ERR = 1u,
168 USBTMC_bREQUEST_INITIATE_ABORT_BULK_OUT = 1u,
169 USBTMC_bREQUEST_CHECK_ABORT_BULK_OUT_STATUS = 2u,
170 USBTMC_bREQUEST_INITIATE_ABORT_BULK_IN = 3u,
171 USBTMC_bREQUEST_CHECK_ABORT_BULK_IN_STATUS = 4u,
172 USBTMC_bREQUEST_INITIATE_CLEAR = 5u,
173 USBTMC_bREQUEST_CHECK_CLEAR_STATUS = 6u,
174 USBTMC_bREQUEST_GET_CAPABILITIES = 7u,
176 USBTMC_bREQUEST_INDICATOR_PULSE = 64u,
179 USB488_bREQUEST_READ_STATUS_BYTE = 128u,
180 USB488_bREQUEST_REN_CONTROL = 160u,
181 USB488_bREQUEST_GO_TO_LOCAL = 161u,
182 USB488_bREQUEST_LOCAL_LOCKOUT = 162u,
184} usmtmc_request_type_enum;
187 USBTMC_STATUS_SUCCESS = 0x01,
188 USBTMC_STATUS_PENDING = 0x02,
189 USBTMC_STATUS_FAILED = 0x80,
190 USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS = 0x81,
191 USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS = 0x82,
192 USBTMC_STATUS_SPLIT_IN_PROGRESS = 0x83,
195 USB488_STATUS_INTERRUPT_IN_BUSY = 0x20
209 unsigned int listenOnly :1;
210 unsigned int talkOnly :1;
211 unsigned int supportsIndicatorPulse :1;
212 } bmIntfcCapabilities;
215 unsigned int canEndBulkInOnTermChar :1;
217 uint8_t _reserved2[6];
218 uint8_t _reserved3[12];
249 unsigned int BulkInFifoBytes : 1;
252 uint32_t NBYTES_RXD_TXD;
265 uint8_t listenOnly :1;
267 uint8_t supportsIndicatorPulse :1;
268 } bmIntfcCapabilities;
272 uint8_t canEndBulkInOnTermChar :1;
275 uint8_t _reserved2[6];
280 uint8_t supportsTrigger :1;
281 uint8_t supportsREN_GTL_LLO :1;
283 } bmIntfcCapabilities488;
291 } bmDevCapabilities488;
292 uint8_t _reserved3[8];
310 unsigned int bTag : 7;
311 unsigned int one : 1;
uint8_t UsingTermChar
Support TermChar && Request.TermCharEnabled && last char in transfer is TermChar.
Definition usbtmc.h:109
uint8_t EOM
Last byte of transfer is the end of the message.
Definition usbtmc.h:108
unsigned int BulkInFifoBytes
Has queued data or a short packet that is queued.
Definition usbtmc.h:228
unsigned int TermCharEnabled
"The Bulk-IN transfer must terminate on the specified TermChar."; CAPABILITIES must list TermChar
Definition usbtmc.h:92
unsigned int EOM
EOM set on last byte.
Definition usbtmc.h:78
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647
uint8_t USBTMC_status
usbtmc_status_enum
Definition usbtmc.h:203
uint8_t MsgID
Message type ID (usbtmc_msgid_enum)
Definition usbtmc.h:59
uint32_t TransferSize
Transfer size; LSB first.
Definition usbtmc.h:75
usbtmc_msg_header_t header
Header.
Definition usbtmc.h:67
uint8_t bTagInverse
Complement of the tag.
Definition usbtmc.h:61
uint8_t bTag
Transfer ID 1<=bTag<=255.
Definition usbtmc.h:60
uint16_t bcdUSBTMC
USBTMC_VERSION.
Definition usbtmc.h:205
uint8_t _reserved
Must be 0x00.
Definition usbtmc.h:62