#include <libusb-1.0/libusb.h>
Go to the source code of this file.
|
| enum | _USB_3_TEST_MODE { USB_3_TEST_LOOPBACK = 0
, USB_3_TEST_BENCHMARK_READ
, USB_3_TEST_BENCHMARK_WRITE
, USB_3_TEST_BENCHMARK_RW
} |
| |
| enum | _USB_3_EP_TYPE { USB_3_EP_CONTROL = 0
, USB_3_EP_ISOCHRONOUS
, USB_3_EP_BULK
, USB_3_EP_INTERRUPT
} |
| |
| enum | {
USB_3_CHANGELEDS = 1
, USB_3_SET_CONFIG
, USB_3_GET_CONFIG
, USB_3_SET_DISP_MODE
,
USB_3_CONF_ERROR_COUNTERS
, USB_3_GET_ERROR_COUNTS
, USB_3_GET_VOLTAGE
, USB_3_RESERVED_DONOTUSE = 0x08
,
USB_3_GET_MAX_SPEED
, USB_3_RESET_ERROR_COUNTERS
, USB_3_CONFIG_LPM_ENTRY
, USB_3_GET_DEVICE_INFO = 0x50
} |
| |
| enum | _USB_3_SPEED { USB_3_ST_UNKNOWN = 0
, USB_3_ST_FS
, USB_3_ST_HS
, USB_3_ST_SS
} |
| |
| enum | _DATA_PATTERN { INCREMENTINGBYTE
, RANDOMBYTE
, CONSTANTBYTE
} |
| |
|
| int | GetUSBPortsInfo () |
| |
| int | SendUSB_3_VendorCommand (libusb_device_handle *udev, int wValue, unsigned char *buf, long bufflen) |
| |
| int | SendUSB_2_VendorCommand (libusb_device_handle *udev, int ReqMode, int Parameter, unsigned char *bufferout, int bufferSize) |
| |
| bool | ConnectUSBPlug (bool bReconnect, int usbPlugIndex, USB3_SPEED Speed, USB_3_TEST_MODE TestMode, libusb_device_handle **handle_udev, unsigned long *MaxTransferSize, unsigned long *CurrentTransferSize, unsigned char **inBuffer, unsigned char **outBuffer) |
| |
| int | GetUSBDeviceInfo (libusb_device_handle *udev, char *serial, unsigned int serial_size, char *desc, unsigned int desc_size, float *fwVer) |
| |
| void | wait_USB (int wait_time) |
| |
| int | LoopbackTest (libusb_device_handle *handle_udev, int usbIndex, int maxTransferSize, unsigned char *inBuffer, unsigned char *outBuffer) |
| |
◆ BENCHMARKCYCLES
| #define BENCHMARKCYCLES 10 |
◆ BUF_128
◆ BUF_256
◆ LOOPBACK_USB_2_PRODUCT_ID
| #define LOOPBACK_USB_2_PRODUCT_ID 0xff0a |
◆ LOOPBACK_USB_3_PRODUCT_ID
| #define LOOPBACK_USB_3_PRODUCT_ID 0xff0b |
◆ LOOPBACK_VENDOR_ID
| #define LOOPBACK_VENDOR_ID 0x0403 |
◆ LPM_ENTRY_DISABLE
| #define LPM_ENTRY_DISABLE 0 |
◆ LPM_ENTRY_ENABLE
| #define LPM_ENTRY_ENABLE (1 << 8) |
◆ MAX_DRIVER_NAME
| #define MAX_DRIVER_NAME 64 |
◆ MAXNUMUSBPORTS
| #define MAXNUMUSBPORTS 20 |
◆ MAXSERIALNUMLEN
| #define MAXSERIALNUMLEN 20 |
◆ READWRITECYCLES
| #define READWRITECYCLES 10 |
◆ USB_2_BENCHMARK
| #define USB_2_BENCHMARK 2 |
◆ USB_2_BENCHMARKFSBUFFERSIZE
| #define USB_2_BENCHMARKFSBUFFERSIZE 2048 |
◆ USB_2_BENCHMARKHISTBUFFERSIZE
| #define USB_2_BENCHMARKHISTBUFFERSIZE 64 |
◆ USB_2_BENCHMARKHSBUFFERSIZE
| #define USB_2_BENCHMARKHSBUFFERSIZE 32768 |
◆ USB_2_CHANGELEDS
| #define USB_2_CHANGELEDS 4 |
◆ USB_2_CHANGEMODE
| #define USB_2_CHANGEMODE 0xB0 |
◆ USB_2_CHANGEMODEIN
| #define USB_2_CHANGEMODEIN 1 |
◆ USB_2_CHANGEMODEOUT
| #define USB_2_CHANGEMODEOUT 2 |
◆ USB_2_CHANGEMODEOUTSTAT
| #define USB_2_CHANGEMODEOUTSTAT 50 |
◆ USB_2_EPBENCHIN
| #define USB_2_EPBENCHIN 0x88 |
◆ USB_2_EPBENCHOUT
| #define USB_2_EPBENCHOUT 0x04 |
◆ USB_2_EPHISTORY
| #define USB_2_EPHISTORY 0x81 |
◆ USB_2_EPLOOPIN
| #define USB_2_EPLOOPIN 0x86 |
◆ USB_2_EPLOOPOUT
| #define USB_2_EPLOOPOUT 0x02 |
◆ USB_2_FSFIFOSIZE
| #define USB_2_FSFIFOSIZE 64 |
◆ USB_2_HSFIFOSIZE
| #define USB_2_HSFIFOSIZE 512 |
◆ USB_2_INITIALISATION
| #define USB_2_INITIALISATION 0 |
◆ USB_2_LOOPBACK
◆ USB_2_LOOPBACKFSBUFFERSIZE
| #define USB_2_LOOPBACKFSBUFFERSIZE 64 |
◆ USB_2_LOOPBACKHSBUFFERSIZE
| #define USB_2_LOOPBACKHSBUFFERSIZE 512 |
◆ USB_2_STATISTICS
| #define USB_2_STATISTICS 3 |
◆ USB_3_BENCHMARK_BUFFER_COUNT
| #define USB_3_BENCHMARK_BUFFER_COUNT 2 |
◆ USB_3_BENCHMARK_BUFFER_SIZE
| #define USB_3_BENCHMARK_BUFFER_SIZE 49512 |
◆ USB_3_BENCHMARK_RW_BUFFER_COUNT
| #define USB_3_BENCHMARK_RW_BUFFER_COUNT 2 |
◆ USB_3_BENCHMARK_RW_BUFFER_SIZE
| #define USB_3_BENCHMARK_RW_BUFFER_SIZE 24576 |
◆ USB_3_CREDIT_HP_TIMEOUT_EN
| #define USB_3_CREDIT_HP_TIMEOUT_EN (1 << 5) |
◆ USB_3_DISPLAY_DISABLE
| #define USB_3_DISPLAY_DISABLE 0 |
◆ USB_3_DISPLAY_ENABLE
| #define USB_3_DISPLAY_ENABLE (1 << 8) |
◆ USB_3_EPLOOPIN
| #define USB_3_EPLOOPIN 0x81 |
◆ USB_3_EPLOOPOUT
| #define USB_3_EPLOOPOUT 0x01 |
◆ USB_3_HDR_ADV_HP_EN
| #define USB_3_HDR_ADV_HP_EN (1 << 9) |
◆ USB_3_HDR_ADV_LCRD_EN
| #define USB_3_HDR_ADV_LCRD_EN (1 << 10) |
◆ USB_3_HDR_ADV_LGO_EN
| #define USB_3_HDR_ADV_LGO_EN (1 << 11) |
◆ USB_3_HDR_ADV_TIMEOUT_EN
| #define USB_3_HDR_ADV_TIMEOUT_EN (1 << 8) |
◆ USB_3_HP_TIMEOUT_EN
| #define USB_3_HP_TIMEOUT_EN (1 << 0) |
◆ USB_3_LOOPBACK_BUFFER_COUNT
| #define USB_3_LOOPBACK_BUFFER_COUNT 64 |
◆ USB_3_LOOPBACK_BUFFER_SIZE
| #define USB_3_LOOPBACK_BUFFER_SIZE 1024 |
◆ USB_3_MISSING_LCRD_EN
| #define USB_3_MISSING_LCRD_EN (1 << 4) |
◆ USB_3_MISSING_LGOOD_EN
| #define USB_3_MISSING_LGOOD_EN (1 << 3) |
◆ USB_3_PHY_ERROR_DECODE_EV
| #define USB_3_PHY_ERROR_DECODE_EV (1 << 0) |
◆ USB_3_PHY_ERROR_DISPARITY_EV
| #define USB_3_PHY_ERROR_DISPARITY_EV (1 << 3) |
◆ USB_3_PHY_ERROR_EB_OVR_EV
| #define USB_3_PHY_ERROR_EB_OVR_EV (1 << 1) |
◆ USB_3_PHY_ERROR_EB_UND_EV
| #define USB_3_PHY_ERROR_EB_UND_EV (1 << 2) |
◆ USB_3_PHY_LOCK_EV
| #define USB_3_PHY_LOCK_EV (1 << 9) |
◆ USB_3_PM_LC_TIMEOUT_EN
| #define USB_3_PM_LC_TIMEOUT_EN (1 << 6) |
◆ USB_3_RX_ERROR_CRC16_EV
| #define USB_3_RX_ERROR_CRC16_EV (1 << 6) |
◆ USB_3_RX_ERROR_CRC32_EV
| #define USB_3_RX_ERROR_CRC32_EV (1 << 7) |
◆ USB_3_RX_ERROR_CRC5_EV
| #define USB_3_RX_ERROR_CRC5_EV (1 << 5) |
◆ USB_3_RX_HP_FAIL_EN
| #define USB_3_RX_HP_FAIL_EN (1 << 2) |
◆ USB_3_RX_SEQ_NUM_ERR_EN
| #define USB_3_RX_SEQ_NUM_ERR_EN (1 << 1) |
◆ USB_3_TRAINING_ERROR_EV
| #define USB_3_TRAINING_ERROR_EV (1 << 8) |
◆ USB_3_TX_SEQ_NUM_ERR_EN
| #define USB_3_TX_SEQ_NUM_ERR_EN (1 << 7) |
◆ BENCHMARK_RESULTS
◆ DATA_PATTERN
◆ USB3_SPEED
◆ USB_3_EP_TYPE
◆ USB_3_TEST_MODE
◆ USBInfoPtr
◆ anonymous enum
| Enumerator |
|---|
| USB_3_CHANGELEDS | |
| USB_3_SET_CONFIG | |
| USB_3_GET_CONFIG | |
| USB_3_SET_DISP_MODE | |
| USB_3_CONF_ERROR_COUNTERS | |
| USB_3_GET_ERROR_COUNTS | |
| USB_3_GET_VOLTAGE | |
| USB_3_RESERVED_DONOTUSE | |
| USB_3_GET_MAX_SPEED | |
| USB_3_RESET_ERROR_COUNTERS | |
| USB_3_CONFIG_LPM_ENTRY | |
| USB_3_GET_DEVICE_INFO | |
◆ _DATA_PATTERN
| Enumerator |
|---|
| INCREMENTINGBYTE | |
| RANDOMBYTE | |
| CONSTANTBYTE | |
◆ _USB_3_EP_TYPE
| Enumerator |
|---|
| USB_3_EP_CONTROL | |
| USB_3_EP_ISOCHRONOUS | |
| USB_3_EP_BULK | |
| USB_3_EP_INTERRUPT | |
◆ _USB_3_SPEED
| Enumerator |
|---|
| USB_3_ST_UNKNOWN | |
| USB_3_ST_FS | |
| USB_3_ST_HS | |
| USB_3_ST_SS | |
◆ _USB_3_TEST_MODE
| Enumerator |
|---|
| USB_3_TEST_LOOPBACK | |
| USB_3_TEST_BENCHMARK_READ | |
| USB_3_TEST_BENCHMARK_WRITE | |
| USB_3_TEST_BENCHMARK_RW | |
◆ ConnectUSBPlug()
| bool ConnectUSBPlug |
( |
bool | bReconnect, |
|
|
int | usbPlugIndex, |
|
|
USB3_SPEED | Speed, |
|
|
USB_3_TEST_MODE | TestMode, |
|
|
libusb_device_handle ** | handle_udev, |
|
|
unsigned long * | MaxTransferSize, |
|
|
unsigned long * | CurrentTransferSize, |
|
|
unsigned char ** | inBuffer, |
|
|
unsigned char ** | outBuffer ) |
◆ GetUSBDeviceInfo()
| int GetUSBDeviceInfo |
( |
libusb_device_handle * | udev, |
|
|
char * | serial, |
|
|
unsigned int | serial_size, |
|
|
char * | desc, |
|
|
unsigned int | desc_size, |
|
|
float * | fwVer ) |
◆ GetUSBPortsInfo()
◆ LoopbackTest()
| int LoopbackTest |
( |
libusb_device_handle * | handle_udev, |
|
|
int | usbIndex, |
|
|
int | maxTransferSize, |
|
|
unsigned char * | inBuffer, |
|
|
unsigned char * | outBuffer ) |
◆ SendUSB_2_VendorCommand()
| int SendUSB_2_VendorCommand |
( |
libusb_device_handle * | udev, |
|
|
int | ReqMode, |
|
|
int | Parameter, |
|
|
unsigned char * | bufferout, |
|
|
int | bufferSize ) |
◆ SendUSB_3_VendorCommand()
| int SendUSB_3_VendorCommand |
( |
libusb_device_handle * | udev, |
|
|
int | wValue, |
|
|
unsigned char * | buf, |
|
|
long | bufflen ) |
◆ wait_USB()
| void wait_USB |
( |
int | wait_time | ) |
|
◆ USB_context
| libusb_context* USB_context |
◆ usbInfo