4.4.8.1.3 Definitions
#define USB_EP_DIR_IN 0x01u
Endpoint direction IN.
#define USB_EP_DIR_OUT 0x00u
Endpoint direction OUT.
#define OVERFLOW_EVENT 1u
Overflow event for the endpoint.
#define UNDERFLOW_EVENT 2u
Underflow event for the endpoint.
#define USB_V2_0 0x0200
USB Specification version 2.00.
#define USB_V2_1 0x0201
USB Specification version 2.01.
#define NO_SUBCLASS 0x00
No subclass code.
#define NO_PROTOCOL 0x00
No protocol code.
#define CLASS_IAD 0xEF
IAD class code.
#define SUB_CLASS_IAD 0x02
IAD subclass code.
#define PROTOCOL_IAD 0x01
IAD protocol code.
#define USB_ENDPOINT_FEATURE_HALT 0x00u
USB endpoint feature halt.
#define DESCRIPTOR_STRING_LENGTH(wstring) (sizeof(wstring) / sizeof(wchar_t) - 1)
Calculates descriptor length of a UTF-16 string descriptor without the null character.
#define USB_CONFIG_ATTR_MUST_SET (1u << 7u)
USB Attribute bitfield for the configuration descriptor.
#define USB_CONFIG_ATTR_BUS_POWERED (0u << 6u)
USB Attribute Bus Powered bitfield for the configuration descriptor.
#define USB_CONFIG_ATTR_SELF_POWERED (1u << 6u)
USB Attribute Self Powered bitfield for the configuration descriptor.
#define USB_CONFIG_ATTR_REMOTE_WAKEUP (1u << 5u)
USB Attribute Remote Wakeup bitfield for the configuration descriptor.
#define USB_CONFIG_MAX_POWER(ma) (((ma) + 1u) / 2u)
USB Max Power bitfield for the configuration descriptor.