Contiki 2.5
compiler.h
1 #ifndef __COMPILER_H__
2 #define __COMPILER_H__
3 
4 #ifdef __IMAGECRAFT__
5 
6 
7 // choose your AVR device here
8 #include <iom128.h>
9 
10 #include <macros.h>
11 
12 #define outp(val, reg) (reg = val)
13 #define inp(reg) (reg)
14 
15 #define cli() CLI()
16 #define sei() SEI()
17 #define cbi(reg, bit) (reg &= ~BIT(bit))
18 #define sbi(reg, bit) (reg |= BIT(bit))
19 
20 #define SIGNAL(x) void x(void)
21 
22 #define nop() NOP()
23 
24 
25 #else /* --- GCC --- */
26 #ifndef __AVR_ATmega128__
27 #define __AVR_ATmega128__
28 #endif
29 #include <avr/signal.h>
30 #include <avr/interrupt.h>
31 #include <avr/io.h>
32 
33 #define nop() asm volatile("nop\n\t"::);
34 
35 #endif /* Compiler Used */
36 
37 
38 
39 #endif /* __COMPILER_H__ */