USB Component  Version 6.16.1
MDK Middleware for USB Device and Host Communication
Data Types

Data Types used by USB Host component. More...

Structures

struct  usbHID_MouseState
 Mouse State structure. More...
 
struct  CDC_LINE_CODING
 CDC Line Coding structure. More...
 
struct  USB_DEVICE_DESCRIPTOR
 USB Device Descriptor structure. More...
 
struct  USB_CONFIGURATION_DESCRIPTOR
 USB Configuration Descriptor structure. More...
 
struct  USB_SETUP_PACKET
 USB Setup Packet structure. More...
 

Typedefs

typedef uint32_t USBH_PIPE_HANDLE
 
typedef void(* USBH_PipeEvent_t) (uint32_t event, const uint8_t *buf, uint32_t len)
 Pointer to USB Host Pipe Event callback function. More...
 

Enumerations

enum  USBH_NOTIFY {
  USBH_NOTIFY_CONNECT = 0U ,
  USBH_NOTIFY_DISCONNECT ,
  USBH_NOTIFY_OVERCURRENT ,
  USBH_NOTIFY_REMOTE_WAKEUP ,
  USBH_NOTIFY_READY ,
  USBH_NOTIFY_UNKNOWN_DEVICE ,
  USBH_NOTIFY_INSUFFICIENT_POWER ,
  USBH_NOTIFY_CONFIGURATION_FAILED ,
  USBH_NOTIFY_INITIALIZATION_FAILED
}
 USB Host Notification enumerated constants. More...
 

Description

Data Types used by USB Host component.


Data Structure Documentation

◆ usbHID_MouseState

struct usbHID_MouseState

Mouse State structure.

Used in

Data Fields
uint8_t reserved Reserved byte (for alignment)
uint8_t button Current button states.
int16_t x Absolute X position change.
int16_t y Absolute Y position change.

◆ CDC_LINE_CODING

struct CDC_LINE_CODING

CDC Line Coding structure.

Used in

Used in

Data Fields
uint32_t dwDTERate Data terminal rate in bits per second.
uint8_t bCharFormat Number of stop bits.
uint8_t bParityType Parity bit type.
uint8_t bDataBits Number of data bits.

◆ USB_DEVICE_DESCRIPTOR

struct USB_DEVICE_DESCRIPTOR

USB Device Descriptor structure.

Used in

Data Fields
uint8_t bLength Size of this descriptor in bytes.
uint8_t bDescriptorType DEVICE Descriptor Type.
uint16_t bcdUSB USB Specification Release Number in Binary-Coded Decimal.
uint8_t bDeviceClass Class code (assigned by the USB-IF)
uint8_t bDeviceSubClass Subclass code (assigned by the USB-IF)
uint8_t bDeviceProtocol Protocol code (assigned by the USB-IF)
uint8_t bMaxPacketSize0 Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid)
uint16_t idVendor Vendor ID (assigned by the USB-IF)
uint16_t idProduct Product ID (assigned by the manufacturer)
uint16_t bcdDevice Device release number in binary-coded decimal.
uint8_t iManufacturer Index of string descriptor describing manufacturer.
uint8_t iProduct Index of string descriptor describing product.
uint8_t iSerialNumber Index of string descriptor describing the device’s serial number.
uint8_t bNumConfigurations Number of possible configurations.

◆ USB_CONFIGURATION_DESCRIPTOR

struct USB_CONFIGURATION_DESCRIPTOR

USB Configuration Descriptor structure.

Used in

Data Fields
uint8_t bLength Size of this descriptor in bytes.
uint8_t bDescriptorType CONFIGURATION Descriptor Type.
uint16_t wTotalLength Total length of data returned for this configuration.
uint8_t bNumInterfaces Number of interfaces supported by this configuration.
uint8_t bConfigurationValue Value to use as an argument to the SetConfiguration() request to select this configuration.
uint8_t iConfiguration Index of string descriptor describing this configuration.
uint8_t bmAttributes Configuration characteristics (D7: Reserved (set to one), D6: Self-powered, D5: Remote Wakeup, D4...0: Reserved (reset to zero))
uint8_t bMaxPower Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. Expressed in 2 mA units (i.e., 50 = 100 mA).

◆ USB_SETUP_PACKET

struct USB_SETUP_PACKET

USB Setup Packet structure.

Used in

Used in

Data Fields
USB_REQUEST_TYPE bmRequestType Characteristics of request.
uint8_t bRequest Specific request.
uint16_t wValue Value according to request.
uint16_t wIndex Index or Offset according to request.
uint16_t wLength Number of bytes to transfer if there is a Data stage.

Typedef Documentation

◆ USBH_PIPE_HANDLE

◆ USBH_PipeEvent_t

typedef void(* USBH_PipeEvent_t)(uint32_t event, const uint8_t *buf, uint32_t len)

Pointer to USB Host Pipe Event callback function.

The argument event specifies the pipe event that happened (as specified by the CMSIS Driver USB Host specification).

The argument buf specifies the start of data buffer used for transfer.

The argument len specifies the number of data bytes successfully transferred (in bytes).

Used in

Enumeration Type Documentation

◆ USBH_NOTIFY

enum USBH_NOTIFY

USB Host Notification enumerated constants.

Enumerator
USBH_NOTIFY_CONNECT 

Port connection happened.

USBH_NOTIFY_DISCONNECT 

Port disconnection happened.

USBH_NOTIFY_OVERCURRENT 

Port overcurrent happened.

USBH_NOTIFY_REMOTE_WAKEUP 

Port remote wakeup signaling happened.

USBH_NOTIFY_READY 

Device was successfully enumerated, initialized and is ready for communication.

USBH_NOTIFY_UNKNOWN_DEVICE 

Device was successfully enumerated but there is no driver for it.

USBH_NOTIFY_INSUFFICIENT_POWER 

Device requires more power consumption than available.

USBH_NOTIFY_CONFIGURATION_FAILED 

Device was not successfully configured (not enough resources)

USBH_NOTIFY_INITIALIZATION_FAILED 

Device was not successfully initialized.