My Project
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
Descriptors.h File Reference
#include <LUFA/Drivers/USB/USB.h>
#include <avr/pgmspace.h>
Include dependency graph for Descriptors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  USB_Descriptor_Configuration_t
 

Macros

#define CDC_NOTIFICATION_EPADDR   (ENDPOINT_DIR_IN | 2)
 
#define CDC_TX_EPADDR   (ENDPOINT_DIR_IN | 3)
 
#define CDC_RX_EPADDR   (ENDPOINT_DIR_OUT | 4)
 
#define CDC_NOTIFICATION_EPSIZE   8
 
#define CDC_TXRX_EPSIZE   16
 

Enumerations

enum  InterfaceDescriptors_t { INTERFACE_ID_CDC_CCI = 0 , INTERFACE_ID_CDC_DCI = 1 }
 
enum  StringDescriptors_t { STRING_ID_Language = 0 , STRING_ID_Manufacturer = 1 , STRING_ID_Product = 2 }
 

Functions

uint16_t CALLBACK_USB_GetDescriptor (const uint16_t wValue, const uint16_t wIndex, const void **const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3)
 

Detailed Description

Header file for Descriptors.c.

Macro Definition Documentation

◆ CDC_NOTIFICATION_EPADDR

#define CDC_NOTIFICATION_EPADDR   (ENDPOINT_DIR_IN | 2)

Endpoint address of the CDC device-to-host notification IN endpoint.

◆ CDC_NOTIFICATION_EPSIZE

#define CDC_NOTIFICATION_EPSIZE   8

Size in bytes of the CDC device-to-host notification IN endpoint.

◆ CDC_RX_EPADDR

#define CDC_RX_EPADDR   (ENDPOINT_DIR_OUT | 4)

Endpoint address of the CDC host-to-device data OUT endpoint.

◆ CDC_TX_EPADDR

#define CDC_TX_EPADDR   (ENDPOINT_DIR_IN | 3)

Endpoint address of the CDC device-to-host data IN endpoint.

◆ CDC_TXRX_EPSIZE

#define CDC_TXRX_EPSIZE   16

Size in bytes of the CDC data IN and OUT endpoints.

Enumeration Type Documentation

◆ InterfaceDescriptors_t

Enum for the device interface descriptor IDs within the device. Each interface descriptor should have a unique ID index associated with it, which can be used to refer to the interface from other descriptors.

Enumerator
INTERFACE_ID_CDC_CCI 

CDC CCI interface descriptor ID

INTERFACE_ID_CDC_DCI 

CDC DCI interface descriptor ID

◆ StringDescriptors_t

Enum for the device string descriptor IDs within the device. Each string descriptor should have a unique ID index associated with it, which can be used to refer to the string from other descriptors.

Enumerator
STRING_ID_Language 

Supported Languages string descriptor ID (must be zero)

STRING_ID_Manufacturer 

Manufacturer string ID

STRING_ID_Product 

Product string ID

Function Documentation

◆ CALLBACK_USB_GetDescriptor()

uint16_t CALLBACK_USB_GetDescriptor ( const uint16_t  wValue,
const uint16_t  wIndex,
const void **const  DescriptorAddress 
)

This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" documentation) by the application code so that the address and size of a requested descriptor can be given to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the USB host.