Data Structures | Defines | Enumerations

StdDescriptors.h File Reference

USB standard descriptor definitions. More...

#include <avr/pgmspace.h>
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "../../../Common/Common.h"
#include "USBMode.h"
#include "Events.h"
#include "../LowLevel/Device.h"
#include "../LowLevel/Device.h"

Data Structures

struct  USB_Descriptor_Header_t
 Standard USB Descriptor Header (LUFA naming conventions). More...
struct  USB_StdDescriptor_Header_t
 Standard USB Descriptor Header (USB-IF naming conventions). More...
struct  USB_Descriptor_Device_t
 Standard USB Device Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_Device_t
 Standard USB Device Descriptor (USB-IF naming conventions). More...
struct  USB_Descriptor_Configuration_Header_t
 Standard USB Configuration Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_Configuration_Header_t
 Standard USB Configuration Descriptor (USB-IF naming conventions). More...
struct  USB_Descriptor_Interface_t
 Standard USB Interface Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_Interface_t
 Standard USB Interface Descriptor (USB-IF naming conventions). More...
struct  USB_Descriptor_Interface_Association_t
 Standard USB Interface Association Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_Interface_Association_t
 Standard USB Interface Association Descriptor (USB-IF naming conventions). More...
struct  USB_Descriptor_Endpoint_t
 Standard USB Endpoint Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_Endpoint_t
 Standard USB Endpoint Descriptor (USB-IF naming conventions). More...
struct  USB_Descriptor_String_t
 Standard USB String Descriptor (LUFA naming conventions). More...
struct  USB_StdDescriptor_String_t
 Standard USB String Descriptor (USB-IF naming conventions). More...

Defines

#define NO_DESCRIPTOR   0
#define USE_INTERNAL_SERIAL   NO_DESCRIPTOR
#define USB_CONFIG_POWER_MA(mA)   ((mA) >> 1)
#define USB_STRING_LEN(str)   (sizeof(USB_Descriptor_Header_t) + ((str) << 1))
#define VERSION_BCD(x)
#define LANGUAGE_ID_ENG   0x0409
#define ENDPOINT_DESCRIPTOR_DIR_IN   0x80
#define ENDPOINT_DESCRIPTOR_DIR_OUT   0x00
#define USB_CONFIG_ATTR_BUSPOWERED   0x80
#define USB_CONFIG_ATTR_SELFPOWERED   0x40
#define USB_CONFIG_ATTR_REMOTEWAKEUP   0x20
#define ENDPOINT_ATTR_NO_SYNC   (0 << 2)
#define ENDPOINT_ATTR_ASYNC   (1 << 2)
#define ENDPOINT_ATTR_ADAPTIVE   (2 << 2)
#define ENDPOINT_ATTR_SYNC   (3 << 2)
#define ENDPOINT_USAGE_DATA   (0 << 4)
#define ENDPOINT_USAGE_FEEDBACK   (1 << 4)
#define ENDPOINT_USAGE_IMPLICIT_FEEDBACK   (2 << 4)

Enumerations

enum  USB_DescriptorTypes_t {
  DTYPE_Device = 0x01,
  DTYPE_Configuration = 0x02,
  DTYPE_String = 0x03,
  DTYPE_Interface = 0x04,
  DTYPE_Endpoint = 0x05,
  DTYPE_DeviceQualifier = 0x06,
  DTYPE_Other = 0x07,
  DTYPE_InterfacePower = 0x08,
  DTYPE_InterfaceAssociation = 0x0B
}

Detailed Description

This file contains structures and macros for the easy creation of standard USB descriptors in USB device projects.

Note:
This file should not be included directly. It is automatically included as needed by the USB driver dispatch header located in LUFA/Drivers/USB/USB.h.