Add architecture guards to all architecture-specific files, so that they can be bulk...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Apr 2012 17:01:46 +0000 (17:01 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Apr 2012 17:01:46 +0000 (17:01 +0000)
28 files changed:
LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c
LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c
LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c
LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c
LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c
LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c
LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c
LUFA/Drivers/USB/Core/UC3/Device_UC3.c
LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
LUFA/Drivers/USB/Core/UC3/Host_UC3.c
LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c
LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c
LUFA/Platform/UC3/Exception.S
LUFA/Platform/UC3/InterruptManagement.c

index f391c06..89d75bf 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_SERIAL_C
 #include "../Serial.h"
 
 #define  __INCLUDE_FROM_SERIAL_C
 #include "../Serial.h"
 
@@ -112,3 +115,5 @@ void Serial_CreateBlockingStream(FILE* Stream)
 
        *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
 }
 
        *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
 }
+
+#endif
index 34e6415..45477fd 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_TWI_C
 #include "../TWI.h"
 
 #define  __INCLUDE_FROM_TWI_C
 #include "../TWI.h"
 
@@ -201,3 +204,4 @@ uint8_t TWI_WritePacket(const uint8_t SlaveAddress,
        return ErrorCode;
 }
 
        return ErrorCode;
 }
 
+#endif
index accdc65..8ec0390 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_SERIAL_C
 #include "../Serial.h"
 
 #define  __INCLUDE_FROM_SERIAL_C
 #include "../Serial.h"
 
@@ -115,3 +118,5 @@ void Serial_CreateBlockingStream(FILE* Stream)
 
        *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
 }
 
        *Stream = (FILE)FDEV_SETUP_STREAM(Serial_putchar, Serial_getchar_Blocking, _FDEV_SETUP_RW);
 }
+
+#endif
index 61f4456..bccbc13 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -51,3 +54,4 @@ void USB_Device_SendRemoteWakeup(void)
 
 #endif
 
 
 #endif
 
+#endif
index 1e7ed9c..0117a1d 100644 (file)
@@ -28,6 +28,9 @@
   this software.\r
 */\r
 \r
   this software.\r
 */\r
 \r
+#include "../../../../Common/Common.h"\r
+#if (ARCH == ARCH_AVR8)\r
+\r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
@@ -269,3 +272,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 \r
 #endif
 
 \r
 #endif
 
+#endif\r
index a6032a6..bcf904d 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -180,3 +183,4 @@ uint8_t Endpoint_WaitUntilReady(void)
 
 #endif
 
 
 #endif
 
+#endif
index fd311e3..3f27c76 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -292,3 +295,4 @@ static void USB_Host_ResetDevice(void)
 
 #endif
 
 
 #endif
 
+#endif
index 2d8e0f7..e71a7bd 100644 (file)
@@ -28,6 +28,9 @@
   this software.\r
 */\r
 \r
   this software.\r
 */\r
 \r
+#include "../../../../Common/Common.h"\r
+#if (ARCH == ARCH_AVR8)\r
+\r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
@@ -213,4 +216,6 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #endif\r
 #include "Template/Template_Pipe_RW.c"\r
 \r
 #endif\r
-
+\r
+#endif\r
+\r
index a6e629c..5e68cc7 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -179,3 +182,4 @@ uint8_t Pipe_WaitUntilReady(void)
 
 #endif
 
 
 #endif
 
+#endif
index 239373c..e31b88d 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
@@ -260,3 +263,4 @@ static void USB_Init_Host(void)
 }
 #endif
 
 }
 #endif
 
+#endif
index 8dfb092..f63cf3e 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_AVR8)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
@@ -273,3 +276,5 @@ ISR(USB_COM_vect, ISR_BLOCK)
 }
 #endif
 
 }
 #endif
 
+#endif
+
index b30edf0..db7286e 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -45,3 +48,4 @@ void USB_Device_SendRemoteWakeup(void)
 
 #endif
 
 
 #endif
 
+#endif
index c099c87..b4e130e 100644 (file)
@@ -28,6 +28,9 @@
   this software.\r
 */\r
 \r
   this software.\r
 */\r
 \r
+#include "../../../../Common/Common.h"\r
+#if (ARCH == ARCH_UC3)\r
+\r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
@@ -229,3 +232,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 \r
 #endif
 
 \r
 #endif
 
+#endif\r
index 3ad806d..fc1b18a 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -173,3 +176,4 @@ uint8_t Endpoint_WaitUntilReady(void)
 
 #endif
 
 
 #endif
 
+#endif
index ef47b60..49d43f9 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -292,3 +295,4 @@ static void USB_Host_ResetDevice(void)
 
 #endif
 
 
 #endif
 
+#endif
index 0d40f92..bb4cbc6 100644 (file)
@@ -28,6 +28,9 @@
   this software.\r
 */\r
 \r
   this software.\r
 */\r
 \r
+#include "../../../../Common/Common.h"\r
+#if (ARCH == ARCH_UC3)\r
+\r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
@@ -160,3 +163,4 @@ uint8_t Pipe_Null_Stream(uint16_t Length,
 \r
 #endif\r
 
 \r
 #endif\r
 
+#endif\r
index dbd03c7..4e77a28 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -178,3 +181,4 @@ uint8_t Pipe_WaitUntilReady(void)
 
 #endif
 
 
 #endif
 
+#endif
index a9a6d35..95ca7d9 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
@@ -217,3 +220,4 @@ static void USB_Init_Host(void)
 }
 #endif
 
 }
 #endif
 
+#endif
index a62646a..d411a93 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
@@ -223,3 +226,4 @@ ISR(USB_COM_vect)
 }
 #endif
 
 }
 #endif
 
+#endif
index fa1b474..130d071 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -42,3 +45,5 @@ void USB_Device_SendRemoteWakeup(void)
 
 #endif
 
 
 #endif
 
+#endif
+
index ce19dca..774a574 100644 (file)
@@ -28,6 +28,9 @@
   this software.\r
 */\r
 \r
   this software.\r
 */\r
 \r
+#include "../../../../Common/Common.h"\r
+#if (ARCH == ARCH_XMEGA)\r
+\r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
 #define  __INCLUDE_FROM_USB_DRIVER\r
 #include "../USBMode.h"\r
 \r
@@ -269,3 +272,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length,
 \r
 #endif
 
 \r
 #endif
 
+#endif\r
index 662f4a3..98e35e5 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -145,3 +148,5 @@ uint8_t Endpoint_WaitUntilReady(void)
 
 #endif
 
 
 #endif
 
+#endif
+
index b2ec971..549ad8b 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -35,3 +38,4 @@
 
 #endif
 
 
 #endif
 
+#endif
index b2ec971..549ad8b 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBMode.h"
 
@@ -35,3 +38,4 @@
 
 #endif
 
 
 #endif
 
+#endif
index a7fa9d1..387e8e4 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
 #define  __INCLUDE_FROM_USB_DRIVER
 #define  __INCLUDE_FROM_USB_CONTROLLER_C
 #include "../USBController.h"
@@ -178,3 +181,4 @@ static void USB_Init_Device(void)
 }
 #endif
 
 }
 #endif
 
+#endif
index 27ffb06..b0e52d0 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../../../Common/Common.h"
+#if (ARCH == ARCH_XMEGA)
+
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
 #define  __INCLUDE_FROM_USB_DRIVER
 #include "../USBInterrupt.h"
 
@@ -101,3 +104,4 @@ ISR(USB_BUSEVENT_vect)
        }
 }
 
        }
 }
 
+#endif
index ddfe009..50f52bd 100644 (file)
@@ -28,6 +28,7 @@
   this software.
 */
 
   this software.
 */
 
+#if defined(__AVR32__)
 #include <avr32/io.h>
 
 .section .exception_handlers, "ax", @progbits
 #include <avr32/io.h>
 
 .section .exception_handlers, "ax", @progbits
@@ -123,3 +124,5 @@ Autovector_Table:
        .word ((AVR32_INTC_INT0 + \Level) << AVR32_INTC_IPR_INTLEVEL_OFFSET) | (Exception_INT\Level - EVBA_Table)
 .endr
 // === END OF GENERAL INTERRUPT HANDLER OFFSET TABLE ===
        .word ((AVR32_INTC_INT0 + \Level) << AVR32_INTC_IPR_INTLEVEL_OFFSET) | (Exception_INT\Level - EVBA_Table)
 .endr
 // === END OF GENERAL INTERRUPT HANDLER OFFSET TABLE ===
+
+#endif
index 7d883c6..b4fd198 100644 (file)
@@ -28,6 +28,9 @@
   this software.
 */
 
   this software.
 */
 
+#include "../../Common/Common.h"
+#if (ARCH == ARCH_UC3)
+
 #define  __INCLUDE_FROM_INTMANAGEMENT_C
 #include "InterruptManagement.h"
 
 #define  __INCLUDE_FROM_INTMANAGEMENT_C
 #include "InterruptManagement.h"
 
@@ -62,3 +65,4 @@ void INTC_Init(void)
        __builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table);
 }
 
        __builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table);
 }
 
+#endif