Skip to content
Snippets Groups Projects
Select Git revision
  • 0c5d6f5f975790f9cd19a0f65a2a0c4598b2862f
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

Descriptors.c

Blame
  • Descriptors.c 10.72 KiB
    /*
                 LUFA Library
         Copyright (C) Dean Camera, 2009.
                  
      dean [at] fourwalledcubicle [dot] com
          www.fourwalledcubicle.com
    */
    
    /*
      Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)
    
      Permission to use, copy, modify, and distribute this software
      and its documentation for any purpose and without fee is hereby
      granted, provided that the above copyright notice appear in all
      copies and that both that the copyright notice and this
      permission notice and warranty disclaimer appear in supporting
      documentation, and that the name of the author not be used in
      advertising or publicity pertaining to distribution of the
      software without specific, written prior permission.
    
      The author disclaim all warranties with regard to this
      software, including all implied warranties of merchantability
      and fitness.  In no event shall the author be liable for any
      special, indirect or consequential damages or any damages
      whatsoever resulting from loss of use, data or profits, whether
      in an action of contract, negligence or other tortious action,
      arising out of or in connection with the use or performance of
      this software.
    */
    
    /** \file
     *
     *  USB Device Descriptors, for library use when in USB device mode. Descriptors are special 
     *  computer-readable structures which the host requests upon device enumeration, to determine
     *  the device's capabilities and functions.  
     */
     
    #include "Descriptors.h"
    
    /** 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.
     */
    USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
    {
    	Header:                 {Size: sizeof(USB_Descriptor_Device_t), Type: DTYPE_Device},
    		
    	USBSpecification:       VERSION_BCD(01.10),
    	Class:                  0x00,
    	SubClass:               0x00,
    	Protocol:               0x00,
    				
    	Endpoint0Size:          8,
    		
    	VendorID:               0x03EB,
    	ProductID:              0x2048,
    	ReleaseNumber:          0x0000,
    		
    	ManufacturerStrIndex:   0x01,
    	ProductStrIndex:        0x02,
    	SerialNumStrIndex:      NO_DESCRIPTOR,
    		
    	NumberOfConfigurations: 1
    };
    
    /** 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.