uMIDI
The swiss army knife for quick and easy developement of MIDI applications.
Data Structures | Macros | Functions
usb_descriptors.h File Reference

USB CDC device descriptors. More...

#include <avr/pgmspace.h>
#include "lufa/LUFA/Drivers/USB/USB.h"
Include dependency graph for usb_descriptors.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  USB_Descriptor_Configuration_t
 

Macros

#define CDC_NOTIFICATION_EPNUM   2
 
#define CDC_TX_EPNUM   3
 
#define CDC_RX_EPNUM   4
 
#define CDC_NOTIFICATION_EPSIZE   8
 
#define CDC_TXRX_EPSIZE   16
 

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

USB CDC device descriptors.

Descriptors are special computer-readable structures which the host requests upon device enumeration, to determine the device's capabilities and functions.

Macro Definition Documentation

◆ CDC_NOTIFICATION_EPNUM

#define CDC_NOTIFICATION_EPNUM   2

Endpoint number 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_EPNUM

#define CDC_RX_EPNUM   4

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

◆ CDC_TX_EPNUM

#define CDC_TX_EPNUM   3

Endpoint number 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.

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.