From 3cb26adeda84ef685a16aa18fb1040078b85db96 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Tue, 3 Apr 2012 14:50:13 +0100 Subject: [PATCH] Added an ASM(foo) macro for cc243x --- cpu/cc2430/8051def.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cpu/cc2430/8051def.h b/cpu/cc2430/8051def.h index 1b36bd207..e8627ddc4 100644 --- a/cpu/cc2430/8051def.h +++ b/cpu/cc2430/8051def.h @@ -52,6 +52,15 @@ typedef unsigned short clock_time_t; #define CCIF #define CLIF +/* Single asm instruction without messing up syntax highlighting */ +#if defined(__SDCC_mcs51) || defined(SDCC_mcs51) +#define ASM(x) __asm \ + x \ + __endasm +#else +#define ASM(x) +#endif + /* Critical section management */ #define DISABLE_INTERRUPTS() do {EA = 0;} while(0) #define ENABLE_INTERRUPTS() do {EA = 1;} while(0)