Data Structures | Defines | Functions

Descriptors.h File Reference

Header file for Descriptors.c. More...

#include <LUFA/Drivers/USB/USB.h>
#include <avr/pgmspace.h>

Go to the source code of this file.

Data Structures

struct  USB_Descriptor_Configuration_t
 Type define for the device configuration descriptor structure. More...

Defines

#define CDC_NOTIFICATION_EPNUM   2
 Endpoint number of the CDC device-to-host notification IN endpoint.
#define CDC_TX_EPNUM   3
 Endpoint number of the CDC device-to-host data IN endpoint.
#define CDC_RX_EPNUM   4
 Endpoint number of the CDC host-to-device data OUT endpoint.
#define CDC_NOTIFICATION_EPSIZE   8
 Size in bytes of the CDC device-to-host notification IN endpoint.
#define CDC_TXRX_EPSIZE   16
 Size in bytes of the CDC data IN and OUT endpoints.

Functions

uint16_t CALLBACK_USB_GetDescriptor (const uint16_t wValue, const uint8_t wIndex, const void **const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3)
 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.

Detailed Description

Header file for Descriptors.c.


Define Documentation

#define CDC_NOTIFICATION_EPNUM   2

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

Referenced by EVENT_USB_Device_ConfigurationChanged().

#define CDC_NOTIFICATION_EPSIZE   8

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

Referenced by EVENT_USB_Device_ConfigurationChanged().

#define CDC_RX_EPNUM   4

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

Referenced by EVENT_USB_Device_ConfigurationChanged().

#define CDC_TX_EPNUM   3

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

Referenced by EVENT_USB_Device_ConfigurationChanged().

#define CDC_TXRX_EPSIZE   16

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

Referenced by EVENT_USB_Device_ConfigurationChanged().


Function Documentation

uint16_t CALLBACK_USB_GetDescriptor ( const uint16_t  wValue,
const uint8_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.

 All Data Structures Files Functions Variables Defines