Add LUFA-111009-BETA tag.
[pub/USBasp.git] / Projects / LEDNotifier / Descriptors.c
index f31f428..f757a62 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2010.
+     Copyright (C) Dean Camera, 2011.
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
-  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration
  *  process begins.
  */
-USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
+const USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
 {
        .Header                 = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device},
 
        .USBSpecification       = VERSION_BCD(01.10),
-       .Class                  = 0x02,
-       .SubClass               = 0x00,
-       .Protocol               = 0x00,
+       .Class                  = CDC_CSCP_CDCClass,
+       .SubClass               = CDC_CSCP_NoSpecificSubclass,
+       .Protocol               = CDC_CSCP_NoSpecificProtocol,
 
        .Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,
 
@@ -81,7 +81,7 @@ USB_Descriptor_Device_t PROGMEM DeviceDescriptor =
  *  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.
  */
-USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
+const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 {
        .Config =
                {
@@ -107,9 +107,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 
                        .TotalEndpoints         = 1,
 
-                       .Class                  = 0x02,
-                       .SubClass               = 0x02,
-                       .Protocol               = 0x01,
+                       .Class                  = CDC_CSCP_CDCClass,
+                       .SubClass               = CDC_CSCP_ACMSubclass,
+                       .Protocol               = CDC_CSCP_ATCommandProtocol,
 
                        .InterfaceStrIndex      = NO_DESCRIPTOR
                },
@@ -143,7 +143,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                {
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_NOTIFICATION_EPNUM),
+                       .EndpointAddress        = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM),
                        .Attributes             = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
                        .EndpointSize           = CDC_NOTIFICATION_EPSIZE,
                        .PollingIntervalMS      = 0xFF
@@ -158,9 +158,9 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
 
                        .TotalEndpoints         = 2,
 
-                       .Class                  = 0x0A,
-                       .SubClass               = 0x00,
-                       .Protocol               = 0x00,
+                       .Class                  = CDC_CSCP_CDCDataClass,
+                       .SubClass               = CDC_CSCP_NoDataSubclass,
+                       .Protocol               = CDC_CSCP_NoDataProtocol,
 
                        .InterfaceStrIndex      = NO_DESCRIPTOR
                },
@@ -169,20 +169,20 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
                {
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_OUT | CDC_RX_EPNUM),
+                       .EndpointAddress        = (ENDPOINT_DIR_OUT | CDC_RX_EPNUM),
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
                        .EndpointSize           = CDC_TXRX_EPSIZE,
-                       .PollingIntervalMS      = 0x00
+                       .PollingIntervalMS      = 0x01
                },
 
        .CDC_DataInEndpoint =
                {
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 
-                       .EndpointAddress        = (ENDPOINT_DESCRIPTOR_DIR_IN | CDC_TX_EPNUM),
+                       .EndpointAddress        = (ENDPOINT_DIR_IN | CDC_TX_EPNUM),
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
                        .EndpointSize           = CDC_TXRX_EPSIZE,
-                       .PollingIntervalMS      = 0x00
+                       .PollingIntervalMS      = 0x01
                }
 };
 
@@ -190,7 +190,7 @@ USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor =
  *  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.
  */
-USB_Descriptor_String_t PROGMEM LanguageString =
+const USB_Descriptor_String_t PROGMEM LanguageString =
 {
        .Header                 = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},
 
@@ -201,7 +201,7 @@ USB_Descriptor_String_t PROGMEM LanguageString =
  *  form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
  *  Descriptor.
  */
-USB_Descriptor_String_t PROGMEM ManufacturerString =
+const USB_Descriptor_String_t PROGMEM ManufacturerString =
 {
        .Header                 = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},
 
@@ -212,7 +212,7 @@ USB_Descriptor_String_t PROGMEM ManufacturerString =
  *  and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
  *  Descriptor.
  */
-USB_Descriptor_String_t PROGMEM ProductString =
+const USB_Descriptor_String_t PROGMEM ProductString =
 {
        .Header                 = {.Size = USB_STRING_LEN(12), .Type = DTYPE_String},