Update Studio Integration DLL, to include package logging.
[pub/USBasp.git] / Projects / RelayBoard / Descriptors.h
index f6357f8..8fe6a35 100644 (file)
@@ -1,14 +1,14 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2010.
+     Copyright (C) Dean Camera, 2015.
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
   Copyright 2010  OBinou (obconseil [at] gmail [dot] com)
-  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2015  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
@@ -19,7 +19,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims 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
@@ -41,7 +41,6 @@
                #include <avr/pgmspace.h>
                #include <LUFA/Drivers/USB/USB.h>
 
-
        /* Type Defines: */
                /** Type define for the device configuration descriptor structure. This must be defined in the
                 *  application code, as the configuration descriptor contains several sub-descriptors which
                 */
                typedef struct
                {
-                       USB_Descriptor_Configuration_Header_t    Config;
-                       USB_Descriptor_Interface_t               RelayBoardInterface;
-               } RelayBoard_USB_Descriptor_Configuration_t;
+                       USB_Descriptor_Configuration_Header_t Config;
+
+                       // Relay Board Interface
+                       USB_Descriptor_Interface_t            RelayBoardInterface;
+               } USB_Descriptor_Configuration_t;
+
+               /** Enum for the device interface descriptor IDs within the device. Each interface descriptor
+                *  should have a unique ID index associated with it, which can be used to refer to the
+                *  interface from other descriptors.
+                */
+               enum InterfaceDescriptors_t
+               {
+                       INTERFACE_ID_RelayBoard = 0, /**< Relay board interface descriptor ID */
+               };
+
+               /** Enum for the device string descriptor IDs within the device. Each string descriptor should
+                *  have a unique ID index associated with it, which can be used to refer to the string from
+                *  other descriptors.
+                */
+               enum StringDescriptors_t
+               {
+                       STRING_ID_Language     = 0, /**< Supported Languages string descriptor ID (must be zero) */
+                       STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */
+                       STRING_ID_Product      = 2, /**< Product string ID */
+                       STRING_ID_Serial       = 3, /**< Serial number string ID */
+               };
 
        /* Function Prototypes: */
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint8_t wIndex,
-                                                   void** const DescriptorAddress);
-
+                                                   const void** const DescriptorAddress)
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 #endif
+