RZT Flexible Software Package Documentation  Release v2.2.0

 
USB Interface

Detailed Description

Interface for USB functions.

Summary

The USB interface provides USB functionality.

Data Structures

struct  usb_cfg_t
 
struct  usb_api_t
 
struct  usb_instance_t
 

Macros

#define USB_BREQUEST
 b15-8
 
#define USB_GET_STATUS
 USB Standard request Get Status.
 
#define USB_CLEAR_FEATURE
 USB Standard request Clear Feature.
 
#define USB_REQRESERVED
 USB Standard request Reqreserved.
 
#define USB_SET_FEATURE
 USB Standard request Set Feature.
 
#define USB_REQRESERVED1
 USB Standard request Reqreserved1.
 
#define USB_SET_ADDRESS
 USB Standard request Set Address.
 
#define USB_GET_DESCRIPTOR
 USB Standard request Get Descriptor.
 
#define USB_SET_DESCRIPTOR
 USB Standard request Set Descriptor.
 
#define USB_GET_CONFIGURATION
 USB Standard request Get Configuration.
 
#define USB_SET_CONFIGURATION
 USB Standard request Set Configuration.
 
#define USB_GET_INTERFACE
 USB Standard request Get Interface.
 
#define USB_SET_INTERFACE
 USB Standard request Set Interface.
 
#define USB_SYNCH_FRAME
 USB Standard request Synch Frame.
 
#define USB_HOST_TO_DEV
 From host to device.
 
#define USB_DEV_TO_HOST
 From device to host.
 
#define USB_STANDARD
 Standard Request.
 
#define USB_CLASS
 Class Request.
 
#define USB_VENDOR
 Vendor Request.
 
#define USB_DEVICE
 Device.
 
#define USB_INTERFACE
 Interface.
 
#define USB_ENDPOINT
 End Point.
 
#define USB_OTHER
 Other.
 
#define USB_NULL
 NULL pointer.
 
#define USB_IP0
 USB0 module.
 
#define USB_IP1
 USB1 module.
 
#define USB_PIPE0
 Pipe Number0.
 
#define USB_PIPE1
 Pipe Number1.
 
#define USB_PIPE2
 Pipe Number2.
 
#define USB_PIPE3
 Pipe Number3.
 
#define USB_PIPE4
 Pipe Number4.
 
#define USB_PIPE5
 Pipe Number5.
 
#define USB_PIPE6
 Pipe Number6.
 
#define USB_PIPE7
 Pipe Number7.
 
#define USB_PIPE8
 Pipe Number8.
 
#define USB_PIPE9
 Pipe Number9.
 
#define USB_EP0
 End Point Number0.
 
#define USB_EP1
 End Point Number1.
 
#define USB_EP2
 End Point Number2.
 
#define USB_EP3
 End Point Number3.
 
#define USB_EP4
 End Point Number4.
 
#define USB_EP5
 End Point Number5.
 
#define USB_EP6
 End Point Number6.
 
#define USB_EP7
 End Point Number7.
 
#define USB_EP8
 End Point Number8.
 
#define USB_EP9
 End Point Number9.
 
#define USB_EP10
 End Point Number10.
 
#define USB_EP11
 End Point Number11.
 
#define USB_EP12
 End Point Number12.
 
#define USB_EP13
 End Point Number13.
 
#define USB_EP14
 End Point Number14.
 
#define USB_EP15
 End Point Number15.
 
#define USB_EP_DIR
 b7: Endpoint Direction
 
#define USB_EP_DIR_IN
 b7: Endpoint Direction In
 
#define USB_EP_DIR_OUT
 b7: Endpoint Direction Out
 
#define USB_DT_DEVICE
 Device Descriptor.
 
#define USB_DT_CONFIGURATION
 Configuration Descriptor.
 
#define USB_DT_STRING
 String Descriptor.
 
#define USB_DT_INTERFACE
 Interface Descriptor.
 
#define USB_DT_ENDPOINT
 Endpoint Descriptor.
 
#define USB_DT_DEVICE_QUALIFIER
 Device Qualifier Descriptor.
 
#define USB_DT_OTHER_SPEED_CONF
 Other Speed Configuration Descriptor.
 
#define USB_DT_INTERFACE_POWER
 Interface Power Descriptor.
 
#define USB_DT_OTGDESCRIPTOR
 OTG Descriptor.
 
#define USB_DT_HUBDESCRIPTOR
 HUB descriptor.
 
#define USB_IFCLS_NOT
 Un corresponding Class.
 
#define USB_IFCLS_AUD
 Audio Class.
 
#define USB_IFCLS_CDC
 CDC Class.
 
#define USB_IFCLS_CDCC
 CDC-Control Class.
 
#define USB_IFCLS_HID
 HID Class.
 
#define USB_IFCLS_PHY
 Physical Class.
 
#define USB_IFCLS_IMG
 Image Class.
 
#define USB_IFCLS_PRN
 Printer Class.
 
#define USB_IFCLS_MAS
 Mass Storage Class.
 
#define USB_IFCLS_HUB
 HUB Class.
 
#define USB_IFCLS_CDCD
 CDC-Data Class.
 
#define USB_IFCLS_CHIP
 Chip/Smart Card Class.
 
#define USB_IFCLS_CNT
 Content-Security Class.
 
#define USB_IFCLS_VID
 Video Class.
 
#define USB_IFCLS_DIAG
 Diagnostic Device.
 
#define USB_IFCLS_WIRE
 Wireless Controller.
 
#define USB_IFCLS_APL
 Application-Specific.
 
#define USB_IFCLS_VEN
 Vendor-Specific Class.
 
#define USB_EP_IN
 In Endpoint.
 
#define USB_EP_OUT
 Out Endpoint.
 
#define USB_EP_ISO
 Isochronous Transfer.
 
#define USB_EP_BULK
 Bulk Transfer.
 
#define USB_EP_INT
 Interrupt Transfer.
 
#define USB_CF_RESERVED
 Reserved(set to 1)
 
#define USB_CF_SELFP
 Self Powered.
 
#define USB_CF_BUSP
 Bus Powered.
 
#define USB_CF_RWUPON
 Remote Wake up ON.
 
#define USB_CF_RWUPOFF
 Remote Wake up OFF.
 
#define USB_DD_BLENGTH
 Device Descriptor Length.
 
#define USB_CD_BLENGTH
 Configuration Descriptor Length.
 
#define USB_ID_BLENGTH
 Interface Descriptor Length.
 
#define USB_ED_BLENGTH
 Endpoint Descriptor Length.
 

Typedefs

typedef void usb_ctrl_t
 

Enumerations

enum  usb_speed_t
 
enum  usb_setup_status_t
 
enum  usb_status_t
 
enum  usb_class_t
 
enum  usb_bcport_t
 
enum  usb_onoff_t
 
enum  usb_transfer_t
 
enum  usb_transfer_type_t
 
enum  usb_mode_t
 
enum  usb_compliancetest_status_t
 

Data Structure Documentation

◆ usb_cfg_t

struct usb_cfg_t

USB configuration.

Data Fields
usb_mode_t usb_mode USB_MODE_HOST/USB_MODE_PERI.
usb_speed_t usb_speed USB speed (USB_HS/USB_FS/USB_LS)
uint8_t module_number USB module number (USB_IP0/USB_IP1)
usb_class_t type USB device class etc.
usb_descriptor_t * p_usb_reg Pointer to the usb_decriptor_t structure area.
usb_compliance_cb_t * usb_complience_cb
IRQn_Type irq USBI dedicated interrupt number storage variable.
IRQn_Type irq_r USBR dedicated interrupt number storage variable.
IRQn_Type irq_d0 FS D0FIFO dedicated interrupt number storage variable.
IRQn_Type irq_d1 FS D1FIFO dedicated interrupt number storage variable.
IRQn_Type hsirq USBIR dedicated interrupt number storage variable.
IRQn_Type hsirq_d0 HS D0FIFO dedicated interrupt number storage variable.
IRQn_Type hsirq_d1 HS D1FIFO dedicated interrupt number storage variable.
uint8_t ipl Variable to store the interrupt priority of USBI.
uint8_t ipl_r Variable to store the interrupt priority of USBR.
uint8_t ipl_d0 Variable to store the interrupt priority of FS D0FIFO.
uint8_t ipl_d1 Variable to store the interrupt priority of FS D1FIFO.
uint8_t hsipl Variable to store the interrupt priority of USBIR.
uint8_t hsipl_d0 Variable to store the interrupt priority of HS D0FIFO.
uint8_t hsipl_d1 Variable to store the interrupt priority of HS D1FIFO.
usb_callback_t * p_usb_apl_callback Application Callback.
void const * p_context Other Context.
const transfer_instance_t * p_transfer_tx Send context.
const transfer_instance_t * p_transfer_rx Receive context.
void const * p_extend Pointer to extended configuration by instance of interface.

◆ usb_api_t

struct usb_api_t

Functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(usb_ctrl_t *const p_ctrl, usb_cfg_t const *const p_cfg)
 
fsp_err_t(* close )(usb_ctrl_t *const p_ctrl)
 
fsp_err_t(* read )(usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t destination)
 
fsp_err_t(* write )(usb_ctrl_t *const p_ctrl, uint8_t const *const p_buf, uint32_t size, uint8_t destination)
 
fsp_err_t(* stop )(usb_ctrl_t *const p_ctrl, usb_transfer_t direction, uint8_t destination)
 
fsp_err_t(* suspend )(usb_ctrl_t *const p_ctrl)
 
fsp_err_t(* resume )(usb_ctrl_t *const p_ctrl)
 
fsp_err_t(* vbusSet )(usb_ctrl_t *const p_ctrl, uint16_t state)
 
fsp_err_t(* infoGet )(usb_ctrl_t *const p_ctrl, usb_info_t *p_info, uint8_t destination)
 
fsp_err_t(* pipeRead )(usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number)
 
fsp_err_t(* pipeWrite )(usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number)
 
fsp_err_t(* pipeStop )(usb_ctrl_t *const p_ctrl, uint8_t pipe_number)
 
fsp_err_t(* usedPipesGet )(usb_ctrl_t *const p_ctrl, uint16_t *p_pipe, uint8_t destination)
 
fsp_err_t(* pipeInfoGet )(usb_ctrl_t *const p_ctrl, usb_pipe_t *p_info, uint8_t pipe_number)
 
fsp_err_t(* eventGet )(usb_ctrl_t *const p_ctrl, usb_status_t *event)
 
fsp_err_t(* callback )(usb_callback_t *p_callback)
 
fsp_err_t(* pullUp )(usb_ctrl_t *const p_ctrl, uint8_t state)
 
fsp_err_t(* hostControlTransfer )(usb_ctrl_t *const p_ctrl, usb_setup_t *p_setup, uint8_t *p_buf, uint8_t device_address)
 
fsp_err_t(* periControlDataGet )(usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size)
 
fsp_err_t(* periControlDataSet )(usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size)
 
fsp_err_t(* periControlStatusSet )(usb_ctrl_t *const p_ctrl, usb_setup_status_t status)
 
fsp_err_t(* remoteWakeup )(usb_ctrl_t *const p_ctrl)
 
fsp_err_t(* driverActivate )(usb_ctrl_t *const p_api_ctrl)
 
fsp_err_t(* callbackMemorySet )(usb_ctrl_t *const p_api_ctrl, usb_callback_args_t *p_callback_memory)
 
fsp_err_t(* moduleNumberGet )(usb_ctrl_t *const p_ctrl, uint8_t *module_number)
 
fsp_err_t(* classTypeGet )(usb_ctrl_t *const p_ctrl, usb_class_t *class_type)
 
fsp_err_t(* deviceAddressGet )(usb_ctrl_t *const p_ctrl, uint8_t *device_address)
 
fsp_err_t(* pipeNumberGet )(usb_ctrl_t *const p_ctrl, uint8_t *pipe_number)
 
fsp_err_t(* deviceStateGet )(usb_ctrl_t *const p_ctrl, uint16_t *state)
 
fsp_err_t(* dataSizeGet )(usb_ctrl_t *const p_ctrl, uint32_t *data_size)
 
fsp_err_t(* setupGet )(usb_ctrl_t *const p_ctrl, usb_setup_t *setup)
 
fsp_err_t(* otgCallbackSet )(usb_ctrl_t *const p_ctrl, usb_otg_callback_t *p_callback)
 
fsp_err_t(* otgSRP )(usb_ctrl_t *const p_ctrl)
 

Field Documentation

◆ open

fsp_err_t(* usb_api_t::open) (usb_ctrl_t *const p_ctrl, usb_cfg_t const *const p_cfg)

Start the USB module

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to configuration structure.

◆ close

fsp_err_t(* usb_api_t::close) (usb_ctrl_t *const p_ctrl)

Stop the USB module

Parameters
[in]p_ctrlPointer to control structure.

◆ read

fsp_err_t(* usb_api_t::read) (usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t destination)

Request USB data read

Parameters
[in]p_ctrlPointer to control structure.
[in]p_bufPointer to area that stores read data.
[in]sizeRead request size.
[in]destinationIn Host mode, it represents the device address, and in Peripheral mode, it represents the device class.

◆ write

fsp_err_t(* usb_api_t::write) (usb_ctrl_t *const p_ctrl, uint8_t const *const p_buf, uint32_t size, uint8_t destination)

Request USB data write

Parameters
[in]p_ctrlPointer to control structure.
[in]p_bufPointer to area that stores write data.
[in]sizeRead request size.
[in]destinationIn Host mode, it represents the device address, and in Peripheral mode, it represents the device class.

◆ stop

fsp_err_t(* usb_api_t::stop) (usb_ctrl_t *const p_ctrl, usb_transfer_t direction, uint8_t destination)

Stop USB data read/write processing

Parameters
[in]p_ctrlPointer to control structure.
[in]directionReceive (USB_TRANSFER_READ) or send (USB_TRANSFER_WRITE).
[in]destinationIn Host mode, it represents the device address, and in Peripheral mode, it represents the device class.

◆ suspend

fsp_err_t(* usb_api_t::suspend) (usb_ctrl_t *const p_ctrl)

Request suspend

Parameters
[in]p_ctrlPointer to control structure.

◆ resume

fsp_err_t(* usb_api_t::resume) (usb_ctrl_t *const p_ctrl)

Request resume

Parameters
[in]p_ctrlPointer to control structure.

◆ vbusSet

fsp_err_t(* usb_api_t::vbusSet) (usb_ctrl_t *const p_ctrl, uint16_t state)

Sets VBUS supply start/stop.

Parameters
[in]p_ctrlPointer to control structure.
[in]stateVBUS supply start/stop specification

◆ infoGet

fsp_err_t(* usb_api_t::infoGet) (usb_ctrl_t *const p_ctrl, usb_info_t *p_info, uint8_t destination)

Get information on USB device.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_infoPointer to usb_info_t structure area.
[in]destinationDevice address for Host.

◆ pipeRead

fsp_err_t(* usb_api_t::pipeRead) (usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number)

Request data read from specified pipe

Parameters
[in]p_ctrlPointer to control structure.
[in]p_bufPointer to area that stores read data.
[in]sizeRead request size.
[in]pipe_numberPipe Number.

◆ pipeWrite

fsp_err_t(* usb_api_t::pipeWrite) (usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number)

Request data write to specified pipe

Parameters
[in]p_ctrlPointer to control structure.
[in]p_bufPointer to area that stores write data.
[in]sizeRead request size.
[in]pipe_numberPipe Number.

◆ pipeStop

fsp_err_t(* usb_api_t::pipeStop) (usb_ctrl_t *const p_ctrl, uint8_t pipe_number)

Stop USB data read/write processing to specified pipe

Parameters
[in]p_ctrlPointer to control structure.
[in]pipe_numberPipe Number.

◆ usedPipesGet

fsp_err_t(* usb_api_t::usedPipesGet) (usb_ctrl_t *const p_ctrl, uint16_t *p_pipe, uint8_t destination)

Get pipe number

Parameters
[in]p_ctrlPointer to control structure.
[in]p_pipePointer to area that stores the selected pipe number (bit map information).
[in]destinationDevice address for Host.

◆ pipeInfoGet

fsp_err_t(* usb_api_t::pipeInfoGet) (usb_ctrl_t *const p_ctrl, usb_pipe_t *p_info, uint8_t pipe_number)

Get pipe information

Parameters
[in]p_ctrlPointer to control structure.
[in]p_infoPointer to usb_pipe_t structure area.
[in]pipe_numberPipe Number.

◆ eventGet

fsp_err_t(* usb_api_t::eventGet) (usb_ctrl_t *const p_ctrl, usb_status_t *event)

Return USB-related completed events (OS less only)

Parameters
[in]p_ctrlPointer to control structure.
[out]eventPointer to event.

◆ callback

fsp_err_t(* usb_api_t::callback) (usb_callback_t *p_callback)

Register a callback function to be called upon completion of a USB related event. (RTOS only)

Parameters
[in]p_callbackPointer to Callback function.

◆ pullUp

fsp_err_t(* usb_api_t::pullUp) (usb_ctrl_t *const p_ctrl, uint8_t state)

Pull-up enable/disable setting of D+/D- line.

Parameters
[in]p_ctrlPointer to control structure.
[in]statePull-up enable/disable setting.

◆ hostControlTransfer

fsp_err_t(* usb_api_t::hostControlTransfer) (usb_ctrl_t *const p_ctrl, usb_setup_t *p_setup, uint8_t *p_buf, uint8_t device_address)

Performs settings and transmission processing when transmitting a setup packet.

Parameters
[in]p_ctrlUSB control structure.
[in]p_setupSetup packet information.
[in]p_bufTransfer area information.
[in]device_addressDevice address information.

◆ periControlDataGet

fsp_err_t(* usb_api_t::periControlDataGet) (usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size)

Receives data sent by control transfer.

Parameters
[in]p_ctrlUSB control structure.
[in]p_bufData reception area information.
[in]sizeData reception size information.

◆ periControlDataSet

fsp_err_t(* usb_api_t::periControlDataSet) (usb_ctrl_t *const p_ctrl, uint8_t *p_buf, uint32_t size)

Performs transfer processing for control transfer.

Parameters
[in]p_ctrlUSB control structure.
[in]p_bufArea information for data transfer.
[in]sizeTransfer size information.

◆ periControlStatusSet

fsp_err_t(* usb_api_t::periControlStatusSet) (usb_ctrl_t *const p_ctrl, usb_setup_status_t status)

Set the response to the setup packet.

Parameters
[in]p_ctrlUSB control structure.
[in]statusUSB port startup information.

◆ remoteWakeup

fsp_err_t(* usb_api_t::remoteWakeup) (usb_ctrl_t *const p_ctrl)

Sends a remote wake-up signal to the connected Host.

Parameters
[in]p_ctrlUSB control structure.

◆ driverActivate

fsp_err_t(* usb_api_t::driverActivate) (usb_ctrl_t *const p_api_ctrl)

Activate USB Driver

Parameters
[in]p_api_ctrlUSB control structure.

◆ callbackMemorySet

fsp_err_t(* usb_api_t::callbackMemorySet) (usb_ctrl_t *const p_api_ctrl, usb_callback_args_t *p_callback_memory)

Set callback memory to USB driver.

Parameters
[in]p_api_ctrlUSB control structure.
[in]p_callback_memoryPointer to store USB event information.

◆ moduleNumberGet

fsp_err_t(* usb_api_t::moduleNumberGet) (usb_ctrl_t *const p_ctrl, uint8_t *module_number)

This API gets the module number.

Parameters
[in]p_ctrlUSB control structure.
[out]module_numberModule number to get.

◆ classTypeGet

fsp_err_t(* usb_api_t::classTypeGet) (usb_ctrl_t *const p_ctrl, usb_class_t *class_type)

This API gets the module number.

Parameters
[in]p_ctrlUSB control structure.
[out]class_typeClass type to get.

◆ deviceAddressGet

fsp_err_t(* usb_api_t::deviceAddressGet) (usb_ctrl_t *const p_ctrl, uint8_t *device_address)

This API gets the device address.

Parameters
[in]p_ctrlUSB control structure.
[out]device_addressDevice address to get.

◆ pipeNumberGet

fsp_err_t(* usb_api_t::pipeNumberGet) (usb_ctrl_t *const p_ctrl, uint8_t *pipe_number)

This API gets the pipe number.

Parameters
[in]p_ctrlUSB control structure.
[out]pipe_numberPipe number to get.

◆ deviceStateGet

fsp_err_t(* usb_api_t::deviceStateGet) (usb_ctrl_t *const p_ctrl, uint16_t *state)

This API gets the state of the device.

Parameters
[in]p_ctrlUSB control structure.
[out]stateDevice state to get.

◆ dataSizeGet

fsp_err_t(* usb_api_t::dataSizeGet) (usb_ctrl_t *const p_ctrl, uint32_t *data_size)

This API gets the data size.

Parameters
[in]p_ctrlUSB control structure.
[out]data_sizeData size to get.

◆ setupGet

fsp_err_t(* usb_api_t::setupGet) (usb_ctrl_t *const p_ctrl, usb_setup_t *setup)

This API gets the setup type.

Parameters
[in]p_ctrlUSB control structure.
[out]setupSetup type to get.

◆ otgCallbackSet

fsp_err_t(* usb_api_t::otgCallbackSet) (usb_ctrl_t *const p_ctrl, usb_otg_callback_t *p_callback)

This API sets the callback function for OTG.

Parameters
[in]p_ctrlUSB control structure.
[in]p_callbackPointer to the callback function for OTG.

◆ otgSRP

fsp_err_t(* usb_api_t::otgSRP) (usb_ctrl_t *const p_ctrl)

This API starts SRP processing for OTG.

Parameters
[in]p_ctrlUSB control structure.

◆ usb_instance_t

struct usb_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
usb_ctrl_t * p_ctrl Pointer to the control structure for this instance.
usb_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
usb_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ usb_ctrl_t

typedef void usb_ctrl_t

USB control block. Allocate an instance specific control block to pass into the USB API calls.

Enumeration Type Documentation

◆ usb_speed_t

USB speed type

Enumerator
USB_SPEED_LS 

Low speed operation.

USB_SPEED_FS 

Full speed operation.

USB_SPEED_HS 

Hi speed operation.

◆ usb_setup_status_t

USB request result

Enumerator
USB_SETUP_STATUS_ACK 

ACK response.

USB_SETUP_STATUS_STALL 

STALL response.

◆ usb_status_t

USB driver status

Enumerator
USB_STATUS_POWERED 

Powered State.

USB_STATUS_DEFAULT 

Default State.

USB_STATUS_ADDRESS 

Address State.

USB_STATUS_CONFIGURED 

Configured State.

USB_STATUS_SUSPEND 

Suspend State.

USB_STATUS_RESUME 

Resume State.

USB_STATUS_DETACH 

Detach State.

USB_STATUS_REQUEST 

Request State.

USB_STATUS_REQUEST_COMPLETE 

Request Complete State.

USB_STATUS_READ_COMPLETE 

Read Complete State.

USB_STATUS_WRITE_COMPLETE 

Write Complete State.

USB_STATUS_BC 

battery Charge State

USB_STATUS_OVERCURRENT 

Over Current state.

USB_STATUS_NOT_SUPPORT 

Device Not Support.

USB_STATUS_NONE 

None Status.

USB_STATUS_MSC_CMD_COMPLETE 

MSC_CMD Complete.

◆ usb_class_t

USB class type

Enumerator
USB_CLASS_PCDC 

PCDC Class.

USB_CLASS_PCDCC 

PCDCC Class.

USB_CLASS_PCDC2 

PCDC2 Class.

USB_CLASS_PCDCC2 

PCDCC2 Class.

USB_CLASS_PHID 

PHID Class.

USB_CLASS_PHID2 

PHID2 Class.

USB_CLASS_PAUD 

PAUD Class.

USB_CLASS_PPRN 

PPRN Class.

USB_CLASS_DFU 

DFU Class.

USB_CLASS_PVND 

PVND Class.

USB_CLASS_HCDC 

HCDC Class.

USB_CLASS_HCDCC 

HCDCC Class.

USB_CLASS_HHID 

HHID Class.

USB_CLASS_HVND 

HVND Class.

USB_CLASS_HMSC 

HMSC Class.

USB_CLASS_PMSC 

PMSC Class.

USB_CLASS_HPRN 

HPRN Class.

USB_CLASS_HUVC 

HUVC Class.

USB_CLASS_REQUEST 

USB Class Request.

USB_CLASS_HUB 

HUB Class.

USB_CLASS_END 

USB Class End Code.

◆ usb_bcport_t

USB battery charging type

Enumerator
USB_BCPORT_SDP 

SDP port settings.

USB_BCPORT_CDP 

CDP port settings.

USB_BCPORT_DCP 

DCP port settings.

◆ usb_onoff_t

USB status

Enumerator
USB_OFF 

USB Off State.

USB_ON 

USB On State.

◆ usb_transfer_t

USB read/write type

Enumerator
USB_TRANSFER_READ 

Data Receive communication.

USB_TRANSFER_WRITE 

Data transmission communication.

◆ usb_transfer_type_t

USB transfer type

Enumerator
USB_TRANSFER_TYPE_BULK 

Bulk communication.

USB_TRANSFER_TYPE_INT 

Interrupt communication.

USB_TRANSFER_TYPE_ISO 

Isochronous communication.

◆ usb_mode_t

enum usb_mode_t
Enumerator
USB_MODE_HOST 

Host mode.

USB_MODE_PERI 

Peripheral mode.

◆ usb_compliancetest_status_t

Enumerator
USB_COMPLIANCETEST_ATTACH 

Device Attach Detection.

USB_COMPLIANCETEST_DETACH 

Device Detach Detection.

USB_COMPLIANCETEST_TPL 

TPL device connect.

USB_COMPLIANCETEST_NOTTPL 

Not TPL device connect.

USB_COMPLIANCETEST_HUB 

USB Hub connect.

USB_COMPLIANCETEST_OVRC 

Over current.

USB_COMPLIANCETEST_NORES 

Response Time out for Control Read Transfer.

USB_COMPLIANCETEST_SETUP_ERR 

Setup Transaction Error.