Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled...
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 20 Jun 2011 04:32:34 +0000 (04:32 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 20 Jun 2011 04:32:34 +0000 (04:32 +0000)
Add C++ compatibility to some header files currently missing extern "C" linkage.

22 files changed:
LUFA/Common/Common.h
LUFA/Common/Endianness.h
LUFA/Drivers/Misc/RingBuffer.h
LUFA/Drivers/USB/Class/Common/HID.h
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
LUFA/Drivers/USB/Core/AVR8/OTG_AVR8.h
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
LUFA/Drivers/USB/Core/ConfigDescriptor.c
LUFA/Drivers/USB/Core/ConfigDescriptor.h
LUFA/Drivers/USB/Core/Device.h
LUFA/Drivers/USB/Core/Endpoint.h
LUFA/Drivers/USB/Core/EndpointStream.h
LUFA/Drivers/USB/Core/Host.h
LUFA/Drivers/USB/Core/OTG.h
LUFA/Drivers/USB/Core/Pipe.h
LUFA/Drivers/USB/Core/PipeStream.h
LUFA/Drivers/USB/Core/StdRequestType.h
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
LUFA/Drivers/USB/Core/USBController.h
LUFA/Drivers/USB/Core/USBInterrupt.h
LUFA/Drivers/USB/Core/USBMode.h
LUFA/ManPages/ChangeLog.txt

index 5635a4e..02fc98f 100644 (file)
                #include "Attributes.h"
                #include "BoardTypes.h"
                
                #include "Attributes.h"
                #include "BoardTypes.h"
                
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Architecture specific utility includes: */
                #if defined(__DOXYGEN__)
                        /** Type define for an unsigned integer the same width as the selected architecture's machine register.
        /* Architecture specific utility includes: */
                #if defined(__DOXYGEN__)
                        /** Type define for an unsigned integer the same width as the selected architecture's machine register.
                                GCC_MEMORY_BARRIER();
                        }
 
                                GCC_MEMORY_BARRIER();
                        }
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index 115d054..58f8012 100644 (file)
 #ifndef __LUFA_ENDIANNESS_H__\r
 #define __LUFA_ENDIANNESS_H__\r
 \r
 #ifndef __LUFA_ENDIANNESS_H__\r
 #define __LUFA_ENDIANNESS_H__\r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_COMMON_H)\r
                        #error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_COMMON_H)\r
                        #error Do not include this file directly. Include LUFA/Common/Common.h instead to gain this functionality.\r
                                }\r
                        }\r
 \r
                                }\r
                        }\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 023cc25..c953638 100644 (file)
        /* Includes: */\r
                #include "../../Common/Common.h"\r
 \r
        /* Includes: */\r
                #include "../../Common/Common.h"\r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Type Defines: */\r
                /** \brief Ring Buffer Management Structure.\r
                 *\r
        /* Type Defines: */\r
                /** \brief Ring Buffer Management Structure.\r
                 *\r
                        return *Buffer->Out;\r
                }\r
 \r
                        return *Buffer->Out;\r
                }\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index a860b65..ce28d34 100644 (file)
                #include "../../Core/StdDescriptors.h"
                #include "HIDParser.h"
 
                #include "../../Core/StdDescriptors.h"
                #include "HIDParser.h"
 
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_HID_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_HID_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
                /** Type define for the data type used to store HID report descriptor elements. */
                typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;
 
                /** Type define for the data type used to store HID report descriptor elements. */
                typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index c98e17c..e969608 100644 (file)
                #include "../USBInterrupt.h"
                #include "../Endpoint.h"
                
                #include "../USBInterrupt.h"
                #include "../Endpoint.h"
                
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
 
        #endif
 
 
        #endif
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index e9b92c0..03b816e 100644 (file)
        /* Includes: */
                #include "../../../../Common/Common.h"
 
        /* Includes: */
                #include "../../../../Common/Common.h"
 
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
                                return ((OTGCON & (1 << HNPREQ)) ? true : false);
                        }
 
                                return ((OTGCON & (1 << HNPREQ)) ? true : false);
                        }
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index 27eabc3..4802463 100644 (file)
@@ -191,7 +191,21 @@ static void USB_Init_Device(void)
 
        #if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
        USB_Descriptor_Device_t* DeviceDescriptorPtr;
 
        #if !defined(FIXED_CONTROL_ENDPOINT_SIZE)
        USB_Descriptor_Device_t* DeviceDescriptorPtr;
+       
+       #if defined(ARCH_HAS_MULTI_ADDRESS_SPACE) && \
+           !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
+       uint8_t DescriptorAddressSpace;
 
 
+       if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr, &DescriptorAddressSpace) != NO_DESCRIPTOR)
+       {
+               if (DescriptorAddressSpace == MEMSPACE_FLASH)
+                 USB_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
+               else if (DescriptorAddressSpace == MEMSPACE_EEPROM)
+                 USB_ControlEndpointSize = eeprom_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
+               else
+                 USB_ControlEndpointSize = DeviceDescriptorPtr->Endpoint0Size;
+       }
+       #else
        if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr) != NO_DESCRIPTOR)
        {
                #if defined(USE_RAM_DESCRIPTORS)
        if (CALLBACK_USB_GetDescriptor((DTYPE_Device << 8), 0, (void*)&DeviceDescriptorPtr) != NO_DESCRIPTOR)
        {
                #if defined(USE_RAM_DESCRIPTORS)
@@ -201,7 +215,8 @@ static void USB_Init_Device(void)
                #else
                USB_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
                #endif
                #else
                USB_ControlEndpointSize = pgm_read_byte(&DeviceDescriptorPtr->Endpoint0Size);
                #endif
-       }
+       }       
+       #endif
        #endif
 
        #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
        #endif
 
        #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
index a7f4d3b..35a0199 100644 (file)
@@ -118,7 +118,7 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
 
 uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
                                   void** const CurrConfigLoc,
 
 uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
                                   void** const CurrConfigLoc,
-                                  const ConfigComparatorPtr_t const ComparatorRoutine)
+                                  ConfigComparatorPtr_t const ComparatorRoutine)
 {
        uint8_t ErrorCode;
 
 {
        uint8_t ErrorCode;
 
index 634dc8f..85cee46 100644 (file)
                         */
                        uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
                                                          void** const CurrConfigLoc,
                         */
                        uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem,
                                                          void** const CurrConfigLoc,
-                                                         const ConfigComparatorPtr_t const ComparatorRoutine);
+                                                         ConfigComparatorPtr_t const ComparatorRoutine);
 
                /* Inline Functions: */
                        /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
 
                /* Inline Functions: */
                        /** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
index 0e86624..85fdfac 100644 (file)
                #include "USBInterrupt.h"\r
                #include "Endpoint.h"\r
 \r
                #include "USBInterrupt.h"\r
                #include "Endpoint.h"\r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/Device_UC3.h"\r
                #endif\r
 \r
                        #include "UC3/Device_UC3.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index bbd7546..d61c5b1 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/Endpoint_UC3.h"\r
                #endif\r
 \r
                        #include "UC3/Endpoint_UC3.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 54f2d83..296dfe5 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"\r
 \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"\r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                #elif (ARCH == ARCH_UC3)\r
                        #include "UC3/EndpointStream_UC3.h"\r
                #endif\r
                #elif (ARCH == ARCH_UC3)\r
                        #include "UC3/EndpointStream_UC3.h"\r
                #endif\r
-               \r
+\r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index da8194f..53a6b9a 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/Host_UC3.h"\r
                #endif\r
 \r
                        #include "UC3/Host_UC3.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 918b2ca..69caa7c 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
                \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
                \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "AVR8/OTG_AVR8.h"\r
                #endif\r
 \r
                        #include "AVR8/OTG_AVR8.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index cf99719..5f82937 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"\r
 \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"\r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/Pipe_UC3.h"\r
                #endif\r
 \r
                        #include "UC3/Pipe_UC3.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 91f4652..ffb2cd4 100644 (file)
                #elif (ARCH == ARCH_UC3)\r
                        #include "UC3/PipeStream_UC3.h"\r
                #endif\r
                #elif (ARCH == ARCH_UC3)\r
                        #include "UC3/PipeStream_UC3.h"\r
                #endif\r
+\r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
        \r
 #endif\r
 \r
        \r
 #endif\r
 \r
index 9a9e6f2..4b3bf33 100644 (file)
                #include "../../../Common/Common.h"
                #include "USBMode.h"            
 
                #include "../../../Common/Common.h"
                #include "USBMode.h"            
 
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
                                #define FEATURE_REMOTE_WAKEUP_ENABLED   (1 << 1)
                #endif
 
                                #define FEATURE_REMOTE_WAKEUP_ENABLED   (1 << 1)
                #endif
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index 8bc8188..22e1746 100644 (file)
                #include "../USBInterrupt.h"\r
                #include "../Endpoint.h"\r
                \r
                #include "../USBInterrupt.h"\r
                #include "../Endpoint.h"\r
                \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
 \r
        #endif\r
 \r
 \r
        #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 0568dee..ac3b9ca 100644 (file)
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
 \r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks and Defines: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks and Defines: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/USBController_UC3.h"      \r
                #endif\r
 \r
                        #include "UC3/USBController_UC3.h"      \r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 /** @} */\r
 #endif\r
 \r
 /** @} */\r
index 3217bda..c1a2b62 100644 (file)
        /* Includes: */\r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
        /* Includes: */\r
                #include "../../../Common/Common.h"\r
                #include "USBMode.h"            \r
-               \r
+\r
+       /* Enable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       extern "C" {\r
+               #endif\r
+\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
        /* Preprocessor Checks: */\r
                #if !defined(__INCLUDE_FROM_USB_DRIVER)\r
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.\r
                        #include "UC3/USBInterrupt_UC3.h"\r
                #endif\r
 \r
                        #include "UC3/USBInterrupt_UC3.h"\r
                #endif\r
 \r
+       /* Disable C linkage for C++ Compilers: */\r
+               #if defined(__cplusplus)\r
+                       }\r
+               #endif\r
+\r
 #endif\r
 \r
 #endif\r
 \r
index 4fb65be..905b568 100644 (file)
 #ifndef __USBMODE_H__
 #define __USBMODE_H__
 
 #ifndef __USBMODE_H__
 #define __USBMODE_H__
 
+       /* Enable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       extern "C" {
+               #endif
+
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
        /* Preprocessor Checks: */
                #if !defined(__INCLUDE_FROM_USB_DRIVER)
                        #error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
                        #endif
        #endif
 
                        #endif
        #endif
 
+       /* Disable C linkage for C++ Compilers: */
+               #if defined(__cplusplus)
+                       }
+               #endif
+
 #endif
 
 /** @} */
 #endif
 
 /** @} */
index 2d7cbb6..c7c11d9 100644 (file)
@@ -45,6 +45,9 @@
   *   - Large number of documentation and code comment corrections (thanks to Andrey from Microsin.ru)
   *   - Fixed possibility of the AVR's SPI interface being pulled out of master mode if the /SS pin is a input and pulled low (thanks
   *     to Andrey from Microsin.ru)
   *   - Large number of documentation and code comment corrections (thanks to Andrey from Microsin.ru)
   *   - Fixed possibility of the AVR's SPI interface being pulled out of master mode if the /SS pin is a input and pulled low (thanks
   *     to Andrey from Microsin.ru)
+  *   - Fixed compile error when FIXED_CONTROL_ENDPOINT_SIZE compile time option was disabled, and a USE_*_DESCRIPTORS compile time
+  *     option was not enabled on the AVR8s
+  *   - Fixed lack of C++ compatibility in some internal header files causing compile errors when using LUFA in C++ projects
   *  - Library Applications:
   *   - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2
   *   - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed
   *  - Library Applications:
   *   - Fixed incorrect signature in the CDC and DFU class bootloaders for the ATMEGA8U2
   *   - Fixed KeyboardHost and KeyboardHostWithParser demos displaying incorrect values when numerical keys were pressed