mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-17 21:09:03 +00:00
40 lines
665 B
C
40 lines
665 B
C
#ifndef COMPILER_H_
|
|
#define COMPILER_H_
|
|
|
|
#ifdef __IMAGECRAFT__
|
|
|
|
|
|
// choose your AVR device here
|
|
#include <iom128.h>
|
|
|
|
#include <macros.h>
|
|
|
|
#define outp(val, reg) (reg = val)
|
|
#define inp(reg) (reg)
|
|
|
|
#define cli() CLI()
|
|
#define sei() SEI()
|
|
#define cbi(reg, bit) (reg &= ~BIT(bit))
|
|
#define sbi(reg, bit) (reg |= BIT(bit))
|
|
|
|
#define SIGNAL(x) void x(void)
|
|
|
|
#define nop() NOP()
|
|
|
|
|
|
#else /* --- GCC --- */
|
|
#ifndef __AVR_ATmega128__
|
|
#define __AVR_ATmega128__
|
|
#endif
|
|
#include <avr/signal.h>
|
|
#include <avr/interrupt.h>
|
|
#include <avr/io.h>
|
|
|
|
#define nop() asm volatile("nop\n\t"::);
|
|
|
|
#endif /* Compiler Used */
|
|
|
|
|
|
|
|
#endif /* COMPILER_H_ */
|