Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
usb_common.h File Reference

useful constants and macros for the USB application More...

#include <version.h>
#include <usb/usb_ch9.h>

Go to the source code of this file.

Macros

#define BCD(x)   __DEPRECATED_MACRO USB_DEC_TO_BCD(dec)
 
#define USB_DEVICE_DESC_SIZE   __DEPRECATED_MACRO 18
 
#define USB_CONFIGURATION_DESC_SIZE   __DEPRECATED_MACRO 9
 
#define USB_INTERFACE_DESC_SIZE   __DEPRECATED_MACRO 9
 
#define USB_ENDPOINT_DESC_SIZE   __DEPRECATED_MACRO 7
 
#define USB_STRING_DESC_SIZE   __DEPRECATED_MACRO 4
 
#define USB_HID_DESC_SIZE   __DEPRECATED_MACRO 9
 
#define USB_DFU_DESC_SIZE   __DEPRECATED_MACRO 9
 
#define USB_DEVICE_QUAL_DESC_SIZE   __DEPRECATED_MACRO 10
 
#define USB_INTERFACE_ASSOC_DESC_SIZE   __DEPRECATED_MACRO 8
 
#define USB_DEVICE_DESC   __DEPRECATED_MACRO 0x01U
 
#define USB_CONFIGURATION_DESC   __DEPRECATED_MACRO 0x02U
 
#define USB_STRING_DESC   __DEPRECATED_MACRO 0x03U
 
#define USB_INTERFACE_DESC   __DEPRECATED_MACRO 0x04U
 
#define USB_ENDPOINT_DESC   __DEPRECATED_MACRO 0x05U
 
#define USB_DEVICE_QUAL_DESC   __DEPRECATED_MACRO 0x06U
 
#define USB_OTHER_SPEED   __DEPRECATED_MACRO 0x07U
 
#define USB_INTERFACE_POWER   __DEPRECATED_MACRO 0x08U
 
#define USB_INTERFACE_ASSOC_DESC   __DEPRECATED_MACRO 0x0BU
 
#define USB_DEVICE_CAPABILITY_DESC   __DEPRECATED_MACRO 0x10U
 
#define USB_HID_DESC   __DEPRECATED_MACRO 0x21U
 
#define USB_HID_REPORT_DESC   __DEPRECATED_MACRO 0x22U
 
#define USB_CS_INTERFACE_DESC   __DEPRECATED_MACRO 0x24U
 
#define USB_CS_ENDPOINT_DESC   __DEPRECATED_MACRO 0x25U
 
#define USB_DFU_FUNCTIONAL_DESC   __DEPRECATED_MACRO 0x21U
 
#define USB_ASSOCIATION_DESC   __DEPRECATED_MACRO 0x0BU
 
#define USB_BINARY_OBJECT_STORE_DESC   __DEPRECATED_MACRO 0x0FU
 
#define USB_1_1   __DEPRECATED_MACRO 0x0110
 
#define USB_2_0   __DEPRECATED_MACRO 0x0200
 
#define USB_2_1   __DEPRECATED_MACRO 0x0210
 
#define BCDDEVICE_RELNUM   __DEPRECATED_MACRO USB_BCD_DRN
 
#define USB_SOF_MAX   __DEPRECATED_MACRO 2047
 
#define USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP   __DEPRECATED_MACRO BIT(5)
 
#define USB_CONFIGURATION_ATTRIBUTES_SELF_POWERED   __DEPRECATED_MACRO BIT(6)
 
#define USB_CONFIGURATION_ATTRIBUTES
 
#define AUDIO_CLASS   __DEPRECATED_MACRO 0x01
 
#define COMMUNICATION_DEVICE_CLASS   __DEPRECATED_MACRO 0x02
 
#define COMMUNICATION_DEVICE_CLASS_DATA   __DEPRECATED_MACRO 0x0A
 
#define HID_CLASS   __DEPRECATED_MACRO 0x03
 
#define MASS_STORAGE_CLASS   __DEPRECATED_MACRO 0x08
 
#define WIRELESS_DEVICE_CLASS   __DEPRECATED_MACRO 0xE0
 
#define MISC_CLASS   __DEPRECATED_MACRO 0xEF
 
#define CUSTOM_CLASS   __DEPRECATED_MACRO 0xFF
 
#define DFU_DEVICE_CLASS   __DEPRECATED_MACRO 0xFE
 
#define CDC_NCM_SUBCLASS   __DEPRECATED_MACRO 0x0d
 
#define BOOT_INTERFACE_SUBCLASS   __DEPRECATED_MACRO 0x01
 
#define SCSI_TRANSPARENT_SUBCLASS   __DEPRECATED_MACRO 0x06
 
#define DFU_INTERFACE_SUBCLASS   __DEPRECATED_MACRO 0x01
 
#define RF_SUBCLASS   __DEPRECATED_MACRO 0x01
 
#define CUSTOM_SUBCLASS   __DEPRECATED_MACRO 0xFF
 
#define MISC_RNDIS_SUBCLASS   __DEPRECATED_MACRO 0x04
 
#define V25TER_PROTOCOL   __DEPRECATED_MACRO 0x01
 
#define MOUSE_PROTOCOL   __DEPRECATED_MACRO 0x02
 
#define BULK_ONLY_PROTOCOL   __DEPRECATED_MACRO 0x50
 
#define DFU_RUNTIME_PROTOCOL   __DEPRECATED_MACRO 0x01
 
#define DFU_MODE_PROTOCOL   __DEPRECATED_MACRO 0x02
 
#define BLUETOOTH_PROTOCOL   __DEPRECATED_MACRO 0x01
 
#define ACM_VENDOR_PROTOCOL   __DEPRECATED_MACRO 0xFF
 
#define MISC_ETHERNET_PROTOCOL   __DEPRECATED_MACRO 0x01
 

Detailed Description

useful constants and macros for the USB application

This file contains useful constants and macros for the USB applications.

Macro Definition Documentation

◆ ACM_VENDOR_PROTOCOL

#define ACM_VENDOR_PROTOCOL   __DEPRECATED_MACRO 0xFF

◆ AUDIO_CLASS

#define AUDIO_CLASS   __DEPRECATED_MACRO 0x01

◆ BCD

#define BCD (   x)    __DEPRECATED_MACRO USB_DEC_TO_BCD(dec)

◆ BCDDEVICE_RELNUM

#define BCDDEVICE_RELNUM   __DEPRECATED_MACRO USB_BCD_DRN

◆ BLUETOOTH_PROTOCOL

#define BLUETOOTH_PROTOCOL   __DEPRECATED_MACRO 0x01

◆ BOOT_INTERFACE_SUBCLASS

#define BOOT_INTERFACE_SUBCLASS   __DEPRECATED_MACRO 0x01

◆ BULK_ONLY_PROTOCOL

#define BULK_ONLY_PROTOCOL   __DEPRECATED_MACRO 0x50

◆ CDC_NCM_SUBCLASS

#define CDC_NCM_SUBCLASS   __DEPRECATED_MACRO 0x0d

◆ COMMUNICATION_DEVICE_CLASS

#define COMMUNICATION_DEVICE_CLASS   __DEPRECATED_MACRO 0x02

◆ COMMUNICATION_DEVICE_CLASS_DATA

#define COMMUNICATION_DEVICE_CLASS_DATA   __DEPRECATED_MACRO 0x0A

◆ CUSTOM_CLASS

#define CUSTOM_CLASS   __DEPRECATED_MACRO 0xFF

◆ CUSTOM_SUBCLASS

#define CUSTOM_SUBCLASS   __DEPRECATED_MACRO 0xFF

◆ DFU_DEVICE_CLASS

#define DFU_DEVICE_CLASS   __DEPRECATED_MACRO 0xFE

◆ DFU_INTERFACE_SUBCLASS

#define DFU_INTERFACE_SUBCLASS   __DEPRECATED_MACRO 0x01

◆ DFU_MODE_PROTOCOL

#define DFU_MODE_PROTOCOL   __DEPRECATED_MACRO 0x02

◆ DFU_RUNTIME_PROTOCOL

#define DFU_RUNTIME_PROTOCOL   __DEPRECATED_MACRO 0x01

◆ HID_CLASS

#define HID_CLASS   __DEPRECATED_MACRO 0x03

◆ MASS_STORAGE_CLASS

#define MASS_STORAGE_CLASS   __DEPRECATED_MACRO 0x08

◆ MISC_CLASS

#define MISC_CLASS   __DEPRECATED_MACRO 0xEF

◆ MISC_ETHERNET_PROTOCOL

#define MISC_ETHERNET_PROTOCOL   __DEPRECATED_MACRO 0x01

◆ MISC_RNDIS_SUBCLASS

#define MISC_RNDIS_SUBCLASS   __DEPRECATED_MACRO 0x04

◆ MOUSE_PROTOCOL

#define MOUSE_PROTOCOL   __DEPRECATED_MACRO 0x02

◆ RF_SUBCLASS

#define RF_SUBCLASS   __DEPRECATED_MACRO 0x01

◆ SCSI_TRANSPARENT_SUBCLASS

#define SCSI_TRANSPARENT_SUBCLASS   __DEPRECATED_MACRO 0x06

◆ USB_1_1

#define USB_1_1   __DEPRECATED_MACRO 0x0110

◆ USB_2_0

#define USB_2_0   __DEPRECATED_MACRO 0x0200

◆ USB_2_1

#define USB_2_1   __DEPRECATED_MACRO 0x0210

◆ USB_ASSOCIATION_DESC

#define USB_ASSOCIATION_DESC   __DEPRECATED_MACRO 0x0BU

◆ USB_BINARY_OBJECT_STORE_DESC

#define USB_BINARY_OBJECT_STORE_DESC   __DEPRECATED_MACRO 0x0FU

◆ USB_CONFIGURATION_ATTRIBUTES

#define USB_CONFIGURATION_ATTRIBUTES
Value:
BIT(7) __DEPRECATED_MACRO \
| ((COND_CODE_1(CONFIG_USB_SELF_POWERED, \
| (COND_CODE_1(CONFIG_USB_DEVICE_REMOTE_WAKEUP, \
#define COND_CODE_1(_flag, _if_1_code, _else_code)
Insert code depending on whether _flag expands to 1 or not.
Definition: util_macro.h:156
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
#define USB_CONFIGURATION_ATTRIBUTES_SELF_POWERED
Definition: usb_common.h:107
#define USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP
Definition: usb_common.h:106

◆ USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP

#define USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP   __DEPRECATED_MACRO BIT(5)

◆ USB_CONFIGURATION_ATTRIBUTES_SELF_POWERED

#define USB_CONFIGURATION_ATTRIBUTES_SELF_POWERED   __DEPRECATED_MACRO BIT(6)

◆ USB_CONFIGURATION_DESC

#define USB_CONFIGURATION_DESC   __DEPRECATED_MACRO 0x02U

◆ USB_CONFIGURATION_DESC_SIZE

#define USB_CONFIGURATION_DESC_SIZE   __DEPRECATED_MACRO 9

◆ USB_CS_ENDPOINT_DESC

#define USB_CS_ENDPOINT_DESC   __DEPRECATED_MACRO 0x25U

◆ USB_CS_INTERFACE_DESC

#define USB_CS_INTERFACE_DESC   __DEPRECATED_MACRO 0x24U

◆ USB_DEVICE_CAPABILITY_DESC

#define USB_DEVICE_CAPABILITY_DESC   __DEPRECATED_MACRO 0x10U

◆ USB_DEVICE_DESC

#define USB_DEVICE_DESC   __DEPRECATED_MACRO 0x01U

◆ USB_DEVICE_DESC_SIZE

#define USB_DEVICE_DESC_SIZE   __DEPRECATED_MACRO 18

◆ USB_DEVICE_QUAL_DESC

#define USB_DEVICE_QUAL_DESC   __DEPRECATED_MACRO 0x06U

◆ USB_DEVICE_QUAL_DESC_SIZE

#define USB_DEVICE_QUAL_DESC_SIZE   __DEPRECATED_MACRO 10

◆ USB_DFU_DESC_SIZE

#define USB_DFU_DESC_SIZE   __DEPRECATED_MACRO 9

◆ USB_DFU_FUNCTIONAL_DESC

#define USB_DFU_FUNCTIONAL_DESC   __DEPRECATED_MACRO 0x21U

◆ USB_ENDPOINT_DESC

#define USB_ENDPOINT_DESC   __DEPRECATED_MACRO 0x05U

◆ USB_ENDPOINT_DESC_SIZE

#define USB_ENDPOINT_DESC_SIZE   __DEPRECATED_MACRO 7

◆ USB_HID_DESC

#define USB_HID_DESC   __DEPRECATED_MACRO 0x21U

◆ USB_HID_DESC_SIZE

#define USB_HID_DESC_SIZE   __DEPRECATED_MACRO 9

◆ USB_HID_REPORT_DESC

#define USB_HID_REPORT_DESC   __DEPRECATED_MACRO 0x22U

◆ USB_INTERFACE_ASSOC_DESC

#define USB_INTERFACE_ASSOC_DESC   __DEPRECATED_MACRO 0x0BU

◆ USB_INTERFACE_ASSOC_DESC_SIZE

#define USB_INTERFACE_ASSOC_DESC_SIZE   __DEPRECATED_MACRO 8

◆ USB_INTERFACE_DESC

#define USB_INTERFACE_DESC   __DEPRECATED_MACRO 0x04U

◆ USB_INTERFACE_DESC_SIZE

#define USB_INTERFACE_DESC_SIZE   __DEPRECATED_MACRO 9

◆ USB_INTERFACE_POWER

#define USB_INTERFACE_POWER   __DEPRECATED_MACRO 0x08U

◆ USB_OTHER_SPEED

#define USB_OTHER_SPEED   __DEPRECATED_MACRO 0x07U

◆ USB_SOF_MAX

#define USB_SOF_MAX   __DEPRECATED_MACRO 2047

◆ USB_STRING_DESC

#define USB_STRING_DESC   __DEPRECATED_MACRO 0x03U

◆ USB_STRING_DESC_SIZE

#define USB_STRING_DESC_SIZE   __DEPRECATED_MACRO 4

◆ V25TER_PROTOCOL

#define V25TER_PROTOCOL   __DEPRECATED_MACRO 0x01

◆ WIRELESS_DEVICE_CLASS

#define WIRELESS_DEVICE_CLASS   __DEPRECATED_MACRO 0xE0