SITL: don't define __AVR_ATmega2560__ on desktop build

this allows us to properly separate the desktop build in the code
This commit is contained in:
Andrew Tridgell 2012-11-19 09:03:35 +11:00
parent 1229cb06c0
commit df19bef23c
8 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@
#include "WProgram.h"
#endif
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) && !defined(DESKTOP_BUILD)
# error Please check the Tools/Board menu to ensure you have selected Arduino Mega as your target.
#else

View File

@ -27,7 +27,7 @@
#include "WProgram.h"
#endif
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__) && !defined(DESKTOP_BUILD)
# error Please check the Tools/Board menu to ensure you have selected Arduino Mega as your target.
#else

View File

@ -64,7 +64,7 @@ extern "C" {
#define DF_LAST_PAGE 4096
// arduino mega SPI pins
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
#define DF_DATAOUT 51 // MOSI
#define DF_DATAIN 50 // MISO
#define DF_SPICLOCK 52 // SCK
@ -145,7 +145,7 @@ void DataFlash_APM1::Init(void)
pinMode(DF_DATAIN, INPUT);
pinMode(DF_SPICLOCK,OUTPUT);
pinMode(DF_SLAVESELECT,OUTPUT);
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
pinMode(DF_RESET,OUTPUT);
// Reset the chip
digitalWrite(DF_RESET,LOW);

View File

@ -58,7 +58,7 @@ extern "C" {
# //*/
// DataFlash is connected to Serial Port 3 (we will use SPI mode)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
#define DF_DATAOUT 14 // MOSI
#define DF_DATAIN 15 // MISO
#define DF_SPICLOCK PJ2 // SCK

View File

@ -121,7 +121,7 @@ OPTFLAGS = -g -Wformat -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-stri
DEPFLAGS = -MD -MT $@
# XXX warning options TBD
CXXOPTS = -fno-exceptions -D__AVR_ATmega2560__ -I$(SKETCHBOOK)/libraries/Desktop/include -DDESKTOP_BUILD=1
CXXOPTS = -fno-exceptions -I$(SKETCHBOOK)/libraries/Desktop/include -DDESKTOP_BUILD=1
COPTS = -I$(SKETCHBOOK)/libraries/Desktop/include -DDESKTOP_BUILD=1
ASOPTS = -assembler-with-cpp

View File

@ -48,7 +48,7 @@
# error "Attempt to include more than one <avr/ioXXX.h> file."
#endif
#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
# define __ATmegaxx0__
#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
# define __ATmegaxx1__

View File

@ -49,7 +49,7 @@
#define TIMER5B 15
#define TIMER5C 16
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
const static uint8_t SS = 53;
const static uint8_t MOSI = 51;
const static uint8_t MISO = 50;

View File

@ -58,7 +58,7 @@ extern "C"{
#define FALLING 2
#define RISING 3
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(DESKTOP_BUILD)
#define INTERNAL1V1 2
#define INTERNAL2V56 3
#else