mirror of https://github.com/ArduPilot/ardupilot
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:
parent
1229cb06c0
commit
df19bef23c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue