QlightRead Project  1.23

/home/ron/Desktop/Downloads/project/QlightRead_hw/Descriptors.c File Reference

#include "Descriptors.h"
Include dependency graph for Descriptors.c:

Go to the source code of this file.

Functions

uint16_t CALLBACK_USB_GetDescriptor (const uint16_t wValue, const uint8_t wIndex, const void **const DescriptorAddress)
 CALLBACK_USB_GetDescriptor() Callback Function for the USB Descriptors.

Variables

USB_Descriptor_Device_t PROGMEM DeviceDescriptor
USB_Descriptor_Configuration_t
PROGMEM 
ConfigurationDescriptor
USB_Descriptor_String_t PROGMEM LanguageString
USB_Descriptor_String_t PROGMEM ManufacturerString
USB_Descriptor_String_t PROGMEM ProductString

Function Documentation

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

CALLBACK_USB_GetDescriptor() Callback Function for the USB Descriptors.

Parameters:
constuint16_t wValue ...
constuint8_t wValue ...
constvoid** const DescriptorAddress ...
Returns:
uint16_t
Return values:
Returnsthe Size of the Descriptor

Definition at line 171 of file Descriptors.c.


Variable Documentation

Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage of the device in one of its supported configurations, including information about any device interfaces and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting a configuration so that the host may correctly communicate with the USB device.

Definition at line 71 of file Descriptors.c.

USB_Descriptor_Device_t PROGMEM DeviceDescriptor
Initial value:
        {
                .Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},

                .USBSpecification       = VERSION_BCD(02.00),
                .Class                  = CDC_CSCP_CDCClass,
                .SubClass               = CDC_CSCP_NoSpecificSubclass,
                .Protocol               = CDC_CSCP_NoSpecificProtocol,

                .Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,

                .VendorID               = 0x03EB,
                .ProductID              = 0x0666,
                .ReleaseNumber          = VERSION_BCD(01.00),

                .ManufacturerStrIndex   = 0x01,
                .ProductStrIndex        = 0x02,
                .SerialNumStrIndex      = USE_INTERNAL_SERIAL,

                .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
        }

Device descriptor structure. This descriptor, located in FLASH memory, describes the overall device characteristics, including the supported USB version, control endpoint size and the number of device configurations. The descriptor is read out by the USB host when the enumeration process begins.

Definition at line 44 of file Descriptors.c.

USB_Descriptor_String_t PROGMEM LanguageString
Initial value:
        {
                .Header                 = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},

                .UnicodeString          = {LANGUAGE_ID_ENG}
        }

Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate via the language ID table available at USB.org what languages the device supports for its string descriptors.

Definition at line 129 of file Descriptors.c.

USB_Descriptor_String_t PROGMEM ManufacturerString
Initial value:
        {
                .Header                 = {.Size = USB_STRING_LEN(61), .Type = DTYPE_String},

                .UnicodeString          = L"Ron Ablinger <trilog_studios@nerdshack.com> QlightRead Harware extension powered by AtmelĀ®"
        }

Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device Descriptor.

Definition at line 140 of file Descriptors.c.

USB_Descriptor_String_t PROGMEM ProductString
Initial value:
        {
                .Header                 = {.Size = USB_STRING_LEN(17), .Type = DTYPE_String},

                .UnicodeString          = L"QlightRead Hardware"
        }

Product descriptor string. This is a Unicode string containing the product's details in human readable form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device Descriptor.

Definition at line 151 of file Descriptors.c.

 All Data Structures Files Functions Variables Defines