Fixes for compiling for Mega

Make more consistent use of architecture #defines.
This commit is contained in:
Yveaux
2015-08-31 19:36:43 +02:00
parent f407617dda
commit cb771ab680
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
* version 2 as published by the Free Software Foundation.
*/
#ifdef __AVR_ATmega328P__
#ifdef ARDUINO_ARCH_AVR
#include "MyHw.h"
#include "MyHwATMega328.h"
@@ -217,4 +217,4 @@ void MyHwATMega328::debugPrint(bool isGW, const char *fmt, ... ) {
}
#endif
#endif // #ifdef __AVR_ATmega328P__
#endif // #ifdef ARDUINO_ARCH_AVR
+2 -2
View File
@@ -20,7 +20,7 @@
#ifndef MyHwATMega328_h
#define MyHwATMega328_h
#ifdef __AVR_ATmega328P__
#ifdef ARDUINO_ARCH_AVR
#include "MyHw.h"
#include "MyConfig.h"
@@ -118,4 +118,4 @@ private:
void internalSleep(unsigned long ms);
};
#endif
#endif // #ifdef __AVR_ATmega328P__
#endif // #ifdef ARDUINO_ARCH_AVR
+2 -2
View File
@@ -17,7 +17,7 @@
* version 2 as published by the Free Software Foundation.
*/
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
#include "MyHw.h"
#include "MyHwESP8266.h"
@@ -181,4 +181,4 @@ void MyHwESP8266::debugPrint(bool isGW, const char *fmt, ... ) {
}
#endif
#endif // #ifdef ESP8266
#endif // #ifdef ARDUINO_ARCH_ESP8266
+2 -2
View File
@@ -17,7 +17,7 @@
* version 2 as published by the Free Software Foundation.
*/
#ifdef ESP8266
#ifdef ARDUINO_ARCH_ESP8266
#ifndef MyHwESP8266_h
#define MyHwESP8266_h
@@ -83,4 +83,4 @@ public:
};
#endif
#endif // #ifdef ESP8266
#endif // #ifdef ARDUINO_ARCH_ESP8266
+2 -2
View File
@@ -41,10 +41,10 @@
// Set the hardware driver to use (initialized by MySensor-class)
//#if defined __AVR_ATmega328P__
#if defined(ESP8266)
#if defined(ARDUINO_ARCH_ESP8266)
#include "MyHwESP8266.h"
typedef MyHwESP8266 MyHwDriver;
#else
#elif defined(ARDUINO_ARCH_AVR)
#include "MyHwATMega328.h"
typedef MyHwATMega328 MyHwDriver;
#endif
+2 -2
View File
@@ -24,7 +24,7 @@
* HMAC-SHA256 authentication with a readout-protected key.
*
*/
#if defined(__AVR__)
#if defined(ARDUINO_ARCH_AVR)
#include "MySigning.h"
#include "MySigningAtsha204.h"
@@ -267,4 +267,4 @@ uint8_t* MySigningAtsha204::sha256(const uint8_t* data, size_t sz) {
DEBUG_SIGNING_PRINTBUF(F("SHA:"), &rx_buffer[SHA204_BUFFER_POS_DATA], 32);
return &rx_buffer[SHA204_BUFFER_POS_DATA];
}
#endif // #if defined(__AVR__)
#endif // #if defined(ARDUINO_ARCH_AVR)
+2 -2
View File
@@ -1,4 +1,4 @@
#if defined(__AVR__)
#if defined(ARDUINO_ARCH_AVR)
#include "Arduino.h"
#include "ATSHA204.h"
@@ -575,4 +575,4 @@ uint8_t ATSHA204Class::sha204c_check_crc(uint8_t *response)
? SHA204_SUCCESS : SHA204_BAD_CRC;
}
#endif // defined(__AVR__)
#endif // defined(ARDUINO_ARCH_AVR)
+2 -2
View File
@@ -43,8 +43,8 @@
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega2560__)
#define RF69_IRQ_PIN 2
#define RF69_IRQ_NUM 2
#elif defined(ESP8266)
// TODO !!
#elif defined(ARDUINO_ARCH_ESP8266)
// TODO !! Untested code! Entering unknown territory...
#define RF69_IRQ_PIN 2
#define RF69_IRQ_NUM 0
#endif