From 8f4f48d963d0dd5751298a3a301dcbb32e26082b Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sat, 7 Apr 2012 17:01:46 +0000 Subject: Add architecture guards to all architecture-specific files, so that they can be bulk-added to existing IDE projects without having to exclude unused architecture files. --- LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c | 5 +++++ LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c | 4 ++++ LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c | 5 +++++ 3 files changed, 14 insertions(+) (limited to 'LUFA/Drivers/Peripheral') diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c index f391c06e0..89d75bf85 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 34e641514..45477fd52 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 accdc659f..8ec0390f3 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 -- cgit v1.2.3