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.
 
 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 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.
 

Enumerations

enum  usb_version_t { USB_VERSION_1x, USB_VERSION_20 }
 USB version definitions.
 
enum  usb_speed_t { USB_SPEED_LOW, USB_SPEED_FULL, USB_SPEED_HIGH }
 USB speed definitions.
 
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. More...
 

Macro Definition Documentation

◆ 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 169 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 204 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 193 of file usb.h.