From 6005a42150bf4d713fd962498bde8b540fef4035 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 13 Mar 2011 21:25:05 +0000 Subject: Add experimental support for the UC3A0, UC3A1 and UC3A3 series AVR32 microcontrollers. --- LUFA/Common/Common.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'LUFA/Common') diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h index c2eeeade5..80bafce3c 100644 --- a/LUFA/Common/Common.h +++ b/LUFA/Common/Common.h @@ -214,6 +214,12 @@ */ #define GCC_FORCE_POINTER_ACCESS(StructPtr) __asm__ __volatile__("" : "=b" (StructPtr) : "0" (StructPtr)) + /** Forces GCC to create a memory barrier, ensuring that memory accesses are not reordered past the barrier point. + * This can be used before ordering-critical operations, to ensure that the compiler does not re-order the resulting + * assembly output in an unexpected manner on sections of code that are ordering-specific. + */ + #define GCC_MEMORY_BARRIER() __asm__ __volatile__("" ::: "memory"); + /* Inline Functions: */ /** Function to reverse the individual bits in a byte - i.e. bit 7 is moved to bit 0, bit 6 to bit 1, * etc. -- cgit v1.2.3