aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Common/Common.h
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-28 22:30:40 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-02-28 22:30:40 +0000
commit54a063c1448d108fcbe60242047e4f818e4ce5e3 (patch)
tree929c7d00fa9d85034c8fc4aa80adc3f09a64d30e /LUFA/Common/Common.h
parent4e6940b58c930e5f305ab816f42f27ca6bde36f7 (diff)
Add in USB_INT_RegisterHandlers() internal function to register the interrupt handler routines used by LUFA. Add dummy loads after clearing the interrupt lines according to the datasheet.
Add in temporary global interrupts enable/disable macros. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1693 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Common/Common.h')
-rw-r--r--LUFA/Common/Common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/LUFA/Common/Common.h b/LUFA/Common/Common.h
index 355391b2..76e1be1e 100644
--- a/LUFA/Common/Common.h
+++ b/LUFA/Common/Common.h
@@ -95,7 +95,7 @@
// TODO
#define EEMEM
#define PROGMEM const
- #define ISR(Name) void Name (void)
+ #define ISR(Name) void Name (void) __attribute__((__interrupt__)); void Name (void)
#define ATOMIC_BLOCK(x) if (1)
#define ATOMIC_RESTORESTATE
#define pgm_read_byte(x) *x
@@ -105,6 +105,8 @@
#define _delay_ms(x)
#define memcmp_P(...) memcmp(__VA_ARGS__)
#define memcpy_P(...) memcpy(__VA_ARGS__)
+ #define cpu_irq_enable() do { asm volatile("" ::: "memory"); __builtin_csrf(AVR32_SR_GM_OFFSET); } while (0)
+ #define cpu_irq_disable() do { __builtin_ssrf(AVR32_SR_GM_OFFSET); asm volatile("" ::: "memory"); } while (0)
#warning The UC3B architecture support is currently experimental and incomplete!
#endif