PebbleOS v4.47.0-757-g12b6c531f
Loading...
Searching...
No Matches

Definitions of the USB 2.0 specification the device stack uses. More...

Data Structures

struct  pbl_usb_setup
 Setup packet, as it arrives, little-endian. More...
 

Macros

#define PBL_USB_FEATURE_ENDPOINT_HALT   0x00U
 Feature selector of a halted endpoint.
 

bmRequestType fields

#define PBL_USB_DIR_IN   0x80U
 
#define PBL_USB_TYPE_MASK   0x60U
 
#define PBL_USB_TYPE_STANDARD   0x00U
 
#define PBL_USB_TYPE_CLASS   0x20U
 
#define PBL_USB_TYPE_VENDOR   0x40U
 
#define PBL_USB_RECIP_MASK   0x1fU
 
#define PBL_USB_RECIP_DEVICE   0x00U
 
#define PBL_USB_RECIP_INTERFACE   0x01U
 
#define PBL_USB_RECIP_ENDPOINT   0x02U
 

Standard requests

#define PBL_USB_REQ_GET_STATUS   0x00U
 
#define PBL_USB_REQ_CLEAR_FEATURE   0x01U
 
#define PBL_USB_REQ_SET_FEATURE   0x03U
 
#define PBL_USB_REQ_SET_ADDRESS   0x05U
 
#define PBL_USB_REQ_GET_DESCRIPTOR   0x06U
 
#define PBL_USB_REQ_GET_CONFIGURATION   0x08U
 
#define PBL_USB_REQ_SET_CONFIGURATION   0x09U
 
#define PBL_USB_REQ_GET_INTERFACE   0x0aU
 
#define PBL_USB_REQ_SET_INTERFACE   0x0bU
 

Descriptor types

#define PBL_USB_DESC_DEVICE   0x01U
 
#define PBL_USB_DESC_CONFIGURATION   0x02U
 
#define PBL_USB_DESC_STRING   0x03U
 
#define PBL_USB_DESC_INTERFACE   0x04U
 
#define PBL_USB_DESC_ENDPOINT   0x05U
 
#define PBL_USB_DESC_DEVICE_QUALIFIER   0x06U
 
#define PBL_USB_DESC_IAD   0x0bU
 
#define PBL_USB_DESC_CS_INTERFACE   0x24U
 

Detailed Description

Definitions of the USB 2.0 specification the device stack uses.


Data Structure Documentation

◆ pbl_usb_setup

struct pbl_usb_setup

Setup packet, as it arrives, little-endian.

Data Fields
uint8_t bmRequestType Direction, type and recipient.
uint8_t bRequest Request.
uint16_t wIndex Index: an interface or an endpoint.
uint16_t wLength Length of the data stage.
uint16_t wValue Value.

Macro Definition Documentation

◆ PBL_USB_DESC_CONFIGURATION

#define PBL_USB_DESC_CONFIGURATION   0x02U

◆ PBL_USB_DESC_CS_INTERFACE

#define PBL_USB_DESC_CS_INTERFACE   0x24U

◆ PBL_USB_DESC_DEVICE

#define PBL_USB_DESC_DEVICE   0x01U

◆ PBL_USB_DESC_DEVICE_QUALIFIER

#define PBL_USB_DESC_DEVICE_QUALIFIER   0x06U

◆ PBL_USB_DESC_ENDPOINT

#define PBL_USB_DESC_ENDPOINT   0x05U

◆ PBL_USB_DESC_IAD

#define PBL_USB_DESC_IAD   0x0bU

◆ PBL_USB_DESC_INTERFACE

#define PBL_USB_DESC_INTERFACE   0x04U

◆ PBL_USB_DESC_STRING

#define PBL_USB_DESC_STRING   0x03U

◆ PBL_USB_DIR_IN

#define PBL_USB_DIR_IN   0x80U

◆ PBL_USB_FEATURE_ENDPOINT_HALT

#define PBL_USB_FEATURE_ENDPOINT_HALT   0x00U

Feature selector of a halted endpoint.

◆ PBL_USB_RECIP_DEVICE

#define PBL_USB_RECIP_DEVICE   0x00U

◆ PBL_USB_RECIP_ENDPOINT

#define PBL_USB_RECIP_ENDPOINT   0x02U

◆ PBL_USB_RECIP_INTERFACE

#define PBL_USB_RECIP_INTERFACE   0x01U

◆ PBL_USB_RECIP_MASK

#define PBL_USB_RECIP_MASK   0x1fU

◆ PBL_USB_REQ_CLEAR_FEATURE

#define PBL_USB_REQ_CLEAR_FEATURE   0x01U

◆ PBL_USB_REQ_GET_CONFIGURATION

#define PBL_USB_REQ_GET_CONFIGURATION   0x08U

◆ PBL_USB_REQ_GET_DESCRIPTOR

#define PBL_USB_REQ_GET_DESCRIPTOR   0x06U

◆ PBL_USB_REQ_GET_INTERFACE

#define PBL_USB_REQ_GET_INTERFACE   0x0aU

◆ PBL_USB_REQ_GET_STATUS

#define PBL_USB_REQ_GET_STATUS   0x00U

◆ PBL_USB_REQ_SET_ADDRESS

#define PBL_USB_REQ_SET_ADDRESS   0x05U

◆ PBL_USB_REQ_SET_CONFIGURATION

#define PBL_USB_REQ_SET_CONFIGURATION   0x09U

◆ PBL_USB_REQ_SET_FEATURE

#define PBL_USB_REQ_SET_FEATURE   0x03U

◆ PBL_USB_REQ_SET_INTERFACE

#define PBL_USB_REQ_SET_INTERFACE   0x0bU

◆ PBL_USB_TYPE_CLASS

#define PBL_USB_TYPE_CLASS   0x20U

◆ PBL_USB_TYPE_MASK

#define PBL_USB_TYPE_MASK   0x60U

◆ PBL_USB_TYPE_STANDARD

#define PBL_USB_TYPE_STANDARD   0x00U

◆ PBL_USB_TYPE_VENDOR

#define PBL_USB_TYPE_VENDOR   0x40U