aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Common/Common.h
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-13 21:25:05 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-03-13 21:25:05 +0000
commit93c0779aee843dcaa3104c0c64148c5e2670f23d (patch)
treecaebf4a4a487b5544f49123add4d6cc3e9284918 /LUFA/Common/Common.h
parenta5d5d1294c923850bfe0beaba267605e673a0eb0 (diff)
Add experimental support for the UC3A0, UC3A1 and UC3A3 series AVR32 microcontrollers.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1704 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Common/Common.h')
-rw-r--r--LUFA/Common/Common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index c2eeeade..80bafce3 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.