Loading...
Searching...
No Matches

Configuration defines for USB peripheral devices. More...

Detailed Description

Configuration defines for USB peripheral devices.

Modules

 CDC - USB communications device class
 Generic USB CDC defines and helpers.
 
 DFU - USB Device Firmware Upgrade
 Generic USB DFU defines and helpers.
 
 HID - USB communications device class
 Generic USB HID defines and helpers.
 
 USB descriptors
 Provides USB protocol descriptors and defines for USB frameworks.
 
 USB peripheral compile time configurations
 
 USBUS CDC ACM - USBUS CDC abstract control model
 USBUS CDC ACM interface module.
 
 USBUS CDC ECM - USBUS CDC ethernet control model
 USBUS CDC ECM interface module.
 
 USBUS DFU - USB Device Firmware Upgrade
 Specific USB DFU defines and helpers for USBUS.
 
 USBUS HID
 USBUS HID interface module.
 
 USBUS Mass Storage Class functions
 
 USBUS device and endpoint manager
 USBUS (Universal Serial Bus Unified Stack), USB device management interface.
 
 usbopt - Configuration options for USB APIs
 List of available configuration options for the usbdev - USB Device Driver API.
 

Files

file  usb.h
 Definition of global compile time configuration options.
 

Macros

#define USB_ENDPOINT_INTERRUPT_FS_MAX_SIZE   (64)
 Maximum transfer size for interrupt endpoints at full speed.
 
#define USB_ENDPOINT_INTERRUPT_HS_MAX_SIZE   (1024)
 Maximum transfer size for interrupt endpoints at high speed.
 
#define USB_ENDPOINT_BULK_FS_MAX_SIZE   (64)
 Maximum transfer size for bulk endpoints at full speed.
 
#define USB_ENDPOINT_BULK_HS_MAX_SIZE   (512)
 Maximum transfer size for bulk endpoints at high speed.
 

Enumerations

enum  usb_version_t { USB_VERSION_1x , USB_VERSION_20 }
 USB version definitions. More...
 
enum  usb_speed_t { USB_SPEED_LOW , USB_SPEED_FULL , USB_SPEED_HIGH }
 USB speed definitions. More...
 
enum  usb_ep_type_t {
  USB_EP_TYPE_NONE = 0 , USB_EP_TYPE_CONTROL , USB_EP_TYPE_INTERRUPT , USB_EP_TYPE_BULK ,
  USB_EP_TYPE_ISOCHRONOUS
}
 USB endpoint types. More...
 
enum  usb_ep_dir_t { USB_EP_DIR_OUT , USB_EP_DIR_IN }
 USB endpoint directions. More...
 
#define USB_H_USER_IS_RIOT_INTERNAL
 RIOT-internal USB peripheral clearance indicator.
 

Macro Definition Documentation

◆ USB_ENDPOINT_BULK_FS_MAX_SIZE

#define USB_ENDPOINT_BULK_FS_MAX_SIZE   (64)

Maximum transfer size for bulk endpoints at full speed.

Definition at line 263 of file usb.h.

◆ USB_ENDPOINT_BULK_HS_MAX_SIZE

#define USB_ENDPOINT_BULK_HS_MAX_SIZE   (512)

Maximum transfer size for bulk endpoints at high speed.

Definition at line 268 of file usb.h.

◆ USB_ENDPOINT_INTERRUPT_FS_MAX_SIZE

#define USB_ENDPOINT_INTERRUPT_FS_MAX_SIZE   (64)

Maximum transfer size for interrupt endpoints at full speed.

Definition at line 253 of file usb.h.

◆ USB_ENDPOINT_INTERRUPT_HS_MAX_SIZE

#define USB_ENDPOINT_INTERRUPT_HS_MAX_SIZE   (1024)

Maximum transfer size for interrupt endpoints at high speed.

Definition at line 258 of file usb.h.

◆ USB_H_USER_IS_RIOT_INTERNAL

#define USB_H_USER_IS_RIOT_INTERNAL

RIOT-internal USB peripheral clearance indicator.

This define must only be set in compilation units that are RIOT internal, and only when they implement peripherals that can be considered default RIOT peripherals.

When this is defined in all uses of usb.h, the board can use the 0x1209/0x7D00 VID/PID pair unless explicit configuration using CONFIG_USB_VID and CONFIG_USB_PID say otherwise.

There is no sharp characterization of what consititutes an internal peripheral; a good check is this: If an application can, just by switching between boards, can have a feature provided by either RIOT's USB stack or a different mechanism, the USB version is a default RIOT peripheral.

Examples are stdio access (is provided by most boards using a UART and an external USB UART adapter), Ethernet (is provided by other boards using ethos) and firmware upload and reset (is provided by other boards using an on-board programmer).

See http://pid.codes/1209/7D00/ for the allocation of that code.

Definition at line 210 of file usb.h.

Enumeration Type Documentation

◆ usb_ep_dir_t

USB endpoint directions.

Enumerator
USB_EP_DIR_OUT 

Host out, device in.

USB_EP_DIR_IN 

Host in, device out.

Definition at line 245 of file usb.h.

◆ usb_ep_type_t

USB endpoint types.

Enumerator
USB_EP_TYPE_NONE 

Unused endpoint

USB_EP_TYPE_CONTROL 

Control type

USB_EP_TYPE_INTERRUPT 

Interrupt type

USB_EP_TYPE_BULK 

Bulk type

USB_EP_TYPE_ISOCHRONOUS 

Isochronous type

Definition at line 234 of file usb.h.

◆ usb_speed_t

USB speed definitions.

Definition at line 225 of file usb.h.

◆ usb_version_t

USB version definitions.

Definition at line 217 of file usb.h.