diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c index f391c06e0f..89d75bf855 100644 --- a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c +++ b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #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); } + +#endif diff --git a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c index 34e6415145..45477fd520 100644 --- a/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c +++ b/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_TWI_C #include "../TWI.h" @@ -201,3 +204,4 @@ uint8_t TWI_WritePacket(const uint8_t SlaveAddress, return ErrorCode; } +#endif diff --git a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c index accdc659f4..8ec0390f33 100644 --- a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c +++ b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #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); } + +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c index 61f445644d..bccbc13865 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -51,3 +54,4 @@ void USB_Device_SendRemoteWakeup(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c index 1e7ed9ce52..0117a1d665 100644 --- a/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -269,3 +272,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length, #endif +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c index a6032a6f44..bcf904d99f 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -180,3 +183,4 @@ uint8_t Endpoint_WaitUntilReady(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c index fd311e335a..3f27c76319 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -292,3 +295,4 @@ static void USB_Host_ResetDevice(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c index 2d8e0f7fea..e71a7bd327 100644 --- a/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -213,4 +216,6 @@ uint8_t Pipe_Null_Stream(uint16_t Length, #include "Template/Template_Pipe_RW.c" #endif - + +#endif + diff --git a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c index a6e629cd96..5e68cc7256 100644 --- a/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -179,3 +182,4 @@ uint8_t Pipe_WaitUntilReady(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c index 239373ce74..e31b88d5ff 100644 --- a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #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 diff --git a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c index 8dfb0923e1..f63cf3eb9e 100644 --- a/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c +++ b/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_AVR8) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBInterrupt.h" @@ -273,3 +276,5 @@ ISR(USB_COM_vect, ISR_BLOCK) } #endif +#endif + diff --git a/LUFA/Drivers/USB/Core/UC3/Device_UC3.c b/LUFA/Drivers/USB/Core/UC3/Device_UC3.c index b30edf0398..db7286ebae 100644 --- a/LUFA/Drivers/USB/Core/UC3/Device_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/Device_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -45,3 +48,4 @@ void USB_Device_SendRemoteWakeup(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c index c099c87533..b4e130e746 100644 --- a/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -229,3 +232,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length, #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c index 3ad806db49..fc1b18a2e8 100644 --- a/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -173,3 +176,4 @@ uint8_t Endpoint_WaitUntilReady(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/Host_UC3.c b/LUFA/Drivers/USB/Core/UC3/Host_UC3.c index ef47b6040a..49d43f9b56 100644 --- a/LUFA/Drivers/USB/Core/UC3/Host_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/Host_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -292,3 +295,4 @@ static void USB_Host_ResetDevice(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c b/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c index 0d40f92166..bb4cbc6593 100644 --- a/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -160,3 +163,4 @@ uint8_t Pipe_Null_Stream(uint16_t Length, #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c index dbd03c7cd1..4e77a28ffe 100644 --- a/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -178,3 +181,4 @@ uint8_t Pipe_WaitUntilReady(void) #endif +#endif diff --git a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c index a9a6d35d9a..95ca7d9aa9 100644 --- a/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/USBController_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #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 diff --git a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c index a62646ae89..d411a93053 100644 --- a/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c +++ b/LUFA/Drivers/USB/Core/UC3/USBInterrupt_UC3.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBInterrupt.h" @@ -223,3 +226,4 @@ ISR(USB_COM_vect) } #endif +#endif diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c index fa1b474a98..130d07116d 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -42,3 +45,5 @@ void USB_Device_SendRemoteWakeup(void) #endif +#endif + diff --git a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c index ce19dcac2e..774a574f38 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -269,3 +272,4 @@ uint8_t Endpoint_Null_Stream(uint16_t Length, #endif +#endif diff --git a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c index 662f4a3c18..98e35e59ae 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -145,3 +148,5 @@ uint8_t Endpoint_WaitUntilReady(void) #endif +#endif + diff --git a/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c index b2ec9717f8..549ad8b63a 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/Host_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -35,3 +38,4 @@ #endif +#endif diff --git a/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c index b2ec9717f8..549ad8b63a 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/PipeStream_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBMode.h" @@ -35,3 +38,4 @@ #endif +#endif diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c index a7fa9d17e3..387e8e417e 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #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 diff --git a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c index 27ffb065a9..b0e52d06e9 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c +++ b/LUFA/Drivers/USB/Core/XMEGA/USBInterrupt_XMEGA.c @@ -28,6 +28,9 @@ this software. */ +#include "../../../../Common/Common.h" +#if (ARCH == ARCH_XMEGA) + #define __INCLUDE_FROM_USB_DRIVER #include "../USBInterrupt.h" @@ -101,3 +104,4 @@ ISR(USB_BUSEVENT_vect) } } +#endif diff --git a/LUFA/Platform/UC3/Exception.S b/LUFA/Platform/UC3/Exception.S index ddfe009848..50f52bdddb 100644 --- a/LUFA/Platform/UC3/Exception.S +++ b/LUFA/Platform/UC3/Exception.S @@ -28,6 +28,7 @@ this software. */ +#if defined(__AVR32__) #include .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 === + +#endif diff --git a/LUFA/Platform/UC3/InterruptManagement.c b/LUFA/Platform/UC3/InterruptManagement.c index 7d883c639b..b4fd198422 100644 --- a/LUFA/Platform/UC3/InterruptManagement.c +++ b/LUFA/Platform/UC3/InterruptManagement.c @@ -28,6 +28,9 @@ this software. */ +#include "../../Common/Common.h" +#if (ARCH == ARCH_UC3) + #define __INCLUDE_FROM_INTMANAGEMENT_C #include "InterruptManagement.h" @@ -62,3 +65,4 @@ void INTC_Init(void) __builtin_mtsr(AVR32_EVBA, (uintptr_t)&EVBA_Table); } +#endif