Open FFBoard
Open source force feedback firmware
usbtmc.h File Reference

Go to the source code of this file.

Classes

struct  TU_ATTR_PACKED
 AUDIO Channel Cluster Descriptor (4.1) More...
 
struct  TU_ATTR_PACKED::TU_ATTR_PACKED
 

Typedefs

typedef struct TU_ATTR_PACKED usbtmc_msg_header_t
 Message header (For BULK OUT and BULK IN); 4 bytes. More...
 
typedef struct TU_ATTR_PACKED usbtmc_msg_generic_t
 
typedef struct TU_ATTR_PACKED usbtmc_msg_request_dev_dep_out
 
typedef struct TU_ATTR_PACKED usbtmc_msg_request_dev_dep_in
 
typedef struct TU_ATTR_PACKED usbtmc_msg_dev_dep_msg_in_header_t
 
typedef struct TU_ATTR_PACKED usbtmc_msg_request_vendor_specific_out
 
typedef struct TU_ATTR_PACKED usbtmc_msg_request_vendor_specific_in
 
typedef struct TU_ATTR_PACKED usbtmc_response_capabilities_t
 
typedef struct TU_ATTR_PACKED usbtmc_get_clear_status_rsp_t
 
typedef struct TU_ATTR_PACKED usbtmc_initiate_abort_rsp_t
 
typedef struct TU_ATTR_PACKED usbtmc_check_abort_bulk_rsp_t
 
typedef struct TU_ATTR_PACKED usbtmc_response_capabilities_488_t
 
typedef struct TU_ATTR_PACKED usbtmc_read_stb_rsp_488_t
 
typedef struct TU_ATTR_PACKED usbtmc_srq_interrupt_488_t
 
typedef struct TU_ATTR_PACKED usbtmc_read_stb_interrupt_488_t
 

Enumerations

enum  usbtmc_msgid_enum {
  USBTMC_MSGID_DEV_DEP_MSG_OUT = 1u , USBTMC_MSGID_DEV_DEP_MSG_IN = 2u , USBTMC_MSGID_VENDOR_SPECIFIC_MSG_OUT = 126u , USBTMC_MSGID_VENDOR_SPECIFIC_IN = 127u ,
  USBTMC_MSGID_USB488_TRIGGER = 128u
}
 
enum  {
  USBTMC_BULK_IN_ERR_INCOMPLETE_HEADER = 1u , USBTMC_BULK_IN_ERR_UNSUPPORTED = 2u , USBTMC_BULK_IN_ERR_BAD_PARAMETER = 3u , USBTMC_BULK_IN_ERR_DATA_TOO_SHORT = 4u ,
  USBTMC_BULK_IN_ERR_DATA_TOO_LONG = 5u
}
 
enum  { USBTMC_BULK_IN_ERR = 1u }
 
enum  usmtmc_request_type_enum {
  USBTMC_bREQUEST_INITIATE_ABORT_BULK_OUT = 1u , USBTMC_bREQUEST_CHECK_ABORT_BULK_OUT_STATUS = 2u , USBTMC_bREQUEST_INITIATE_ABORT_BULK_IN = 3u , USBTMC_bREQUEST_CHECK_ABORT_BULK_IN_STATUS = 4u ,
  USBTMC_bREQUEST_INITIATE_CLEAR = 5u , USBTMC_bREQUEST_CHECK_CLEAR_STATUS = 6u , USBTMC_bREQUEST_GET_CAPABILITIES = 7u , USBTMC_bREQUEST_INDICATOR_PULSE = 64u ,
  USB488_bREQUEST_READ_STATUS_BYTE = 128u , USB488_bREQUEST_REN_CONTROL = 160u , USB488_bREQUEST_GO_TO_LOCAL = 161u , USB488_bREQUEST_LOCAL_LOCKOUT = 162u
}
 
enum  usbtmc_int_in_payload_format {
  USBTMC_bNOTIFY1_USBTMC_FIRST = 0x00 , USBTMC_bNOTIFY1_USBTMC_LAST = 0x3F , USBTMC_bNOTIFY1_VENDOR_SPECIFIC_FIRST = 0x40 , USBTMC_bNOTIFY1_VENDOR_SPECIFIC_LAST = 0x7F ,
  USBTMC_bNOTIFY1_SUBCLASS_FIRST = 0x80 , USBTMC_bNOTIFY1_SUBCLASS_LAST = 0xFF , USB488_bNOTIFY1_SRQ = 0x81
}
 
enum  usbtmc_status_enum {
  USBTMC_STATUS_SUCCESS = 0x01 , USBTMC_STATUS_PENDING = 0x02 , USBTMC_STATUS_FAILED = 0x80 , USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS = 0x81 ,
  USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS = 0x82 , USBTMC_STATUS_SPLIT_IN_PROGRESS = 0x83 , USB488_STATUS_INTERRUPT_IN_BUSY = 0x20
}
 

Functions

 TU_VERIFY_STATIC (sizeof(usbtmc_msg_request_dev_dep_out)==12u, "struct wrong length")
 

Typedef Documentation

◆ usbtmc_check_abort_bulk_rsp_t

◆ usbtmc_get_clear_status_rsp_t

◆ usbtmc_initiate_abort_rsp_t

◆ usbtmc_msg_dev_dep_msg_in_header_t

◆ usbtmc_msg_generic_t

◆ usbtmc_msg_header_t

Message header (For BULK OUT and BULK IN); 4 bytes.

◆ usbtmc_msg_request_dev_dep_in

◆ usbtmc_msg_request_dev_dep_out

◆ usbtmc_msg_request_vendor_specific_in

◆ usbtmc_msg_request_vendor_specific_out

◆ usbtmc_read_stb_interrupt_488_t

◆ usbtmc_read_stb_rsp_488_t

◆ usbtmc_response_capabilities_488_t

◆ usbtmc_response_capabilities_t

◆ usbtmc_srq_interrupt_488_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
USBTMC_BULK_IN_ERR_INCOMPLETE_HEADER 
USBTMC_BULK_IN_ERR_UNSUPPORTED 
USBTMC_BULK_IN_ERR_BAD_PARAMETER 
USBTMC_BULK_IN_ERR_DATA_TOO_SHORT 
USBTMC_BULK_IN_ERR_DATA_TOO_LONG 

Definition at line 154 of file usbtmc.h.

◆ anonymous enum

anonymous enum
Enumerator
USBTMC_BULK_IN_ERR 

receives a USBTMC command message that expects a response while a Bulk-IN transfer is in progress

Definition at line 162 of file usbtmc.h.

◆ usbtmc_int_in_payload_format

Enumerator
USBTMC_bNOTIFY1_USBTMC_FIRST 
USBTMC_bNOTIFY1_USBTMC_LAST 
USBTMC_bNOTIFY1_VENDOR_SPECIFIC_FIRST 
USBTMC_bNOTIFY1_VENDOR_SPECIFIC_LAST 
USBTMC_bNOTIFY1_SUBCLASS_FIRST 
USBTMC_bNOTIFY1_SUBCLASS_LAST 
USB488_bNOTIFY1_SRQ 

Definition at line 186 of file usbtmc.h.

◆ usbtmc_msgid_enum

Enumerator
USBTMC_MSGID_DEV_DEP_MSG_OUT 
USBTMC_MSGID_DEV_DEP_MSG_IN 
USBTMC_MSGID_VENDOR_SPECIFIC_MSG_OUT 
USBTMC_MSGID_VENDOR_SPECIFIC_IN 
USBTMC_MSGID_USB488_TRIGGER 

Definition at line 48 of file usbtmc.h.

◆ usbtmc_status_enum

Enumerator
USBTMC_STATUS_SUCCESS 
USBTMC_STATUS_PENDING 
USBTMC_STATUS_FAILED 
USBTMC_STATUS_TRANSFER_NOT_IN_PROGRESS 
USBTMC_STATUS_SPLIT_NOT_IN_PROGRESS 
USBTMC_STATUS_SPLIT_IN_PROGRESS 
USB488_STATUS_INTERRUPT_IN_BUSY 

Definition at line 203 of file usbtmc.h.

◆ usmtmc_request_type_enum

Enumerator
USBTMC_bREQUEST_INITIATE_ABORT_BULK_OUT 
USBTMC_bREQUEST_CHECK_ABORT_BULK_OUT_STATUS 
USBTMC_bREQUEST_INITIATE_ABORT_BULK_IN 
USBTMC_bREQUEST_CHECK_ABORT_BULK_IN_STATUS 
USBTMC_bREQUEST_INITIATE_CLEAR 
USBTMC_bREQUEST_CHECK_CLEAR_STATUS 
USBTMC_bREQUEST_GET_CAPABILITIES 
USBTMC_bREQUEST_INDICATOR_PULSE 
USB488_bREQUEST_READ_STATUS_BYTE 
USB488_bREQUEST_REN_CONTROL 
USB488_bREQUEST_GO_TO_LOCAL 
USB488_bREQUEST_LOCAL_LOCKOUT 

Definition at line 167 of file usbtmc.h.

Function Documentation

◆ TU_VERIFY_STATIC()

TU_VERIFY_STATIC ( sizeof(usbtmc_msg_request_dev_dep_out = =12u,
"struct wrong length"   
)