Improve AVR arch detection

Replace ARDUINO_ARCH_AVR with __AVR__ to better detect architecture for non-Arduino dev environments.  Resolves compile failure in PIO for 8-bit Teensduino targets

More info:
https://forum.pjrc.com/threads/33234-Using-Teensyduino-Selecting-Teensy-3-2-3-1-board-has-incorrect-platform-define
http://www.atmel.com/webdoc/avrlibcreferencemanual/using_tools_1using_avr_gcc_mach_opt.html
This commit is contained in:
Dave Johnson
2017-09-23 21:25:28 -07:00
parent 8089f73549
commit f58ba3a64e
22 changed files with 30 additions and 30 deletions

View File

@ -23,11 +23,11 @@
/**
* Description: HAL for AVR
*
* For ARDUINO_ARCH_AVR
* For __AVR__
*/
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
// --------------------------------------------------------------------------
// Includes

View File

@ -22,7 +22,7 @@
/**
* Description: HAL for AVR
*
* For ARDUINO_ARCH_AVR
* For __AVR__
*/

View File

@ -28,10 +28,10 @@
/**
* Description: HAL for AVR - SPI functions
*
* For ARDUINO_ARCH_AVR
* For __AVR__
*/
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
// --------------------------------------------------------------------------
// Includes
@ -210,4 +210,4 @@ void spiBegin (void) {
#endif // SOFTWARE_SPI
#endif // ARDUINO_ARCH_AVR
#endif // __AVR__

View File

@ -28,7 +28,7 @@
* Modified 28 September 2010 by Mark Sproul
* Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
*/
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
#include "MarlinSerial.h"
#include "../../Marlin.h"

View File

@ -1,4 +1,4 @@
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
#include "../persistent_store_api.h"
@ -52,4 +52,4 @@ void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
}
#endif // EEPROM_SETTINGS
#endif // ARDUINO_ARCH_AVR
#endif // __AVR__

View File

@ -51,7 +51,7 @@
*
*/
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
#include "../../inc/MarlinConfig.h"
@ -215,4 +215,4 @@ void finISR(timer16_Sequence_t timer) {
#endif // HAS_SERVOS
#endif // ARDUINO_ARCH_AVR
#endif // __AVR__

View File

@ -20,7 +20,7 @@
*
*/
#ifdef ARDUINO_ARCH_AVR
#ifdef __AVR__
#include "../../inc/MarlinConfig.h"
@ -58,4 +58,4 @@ void watchdog_init() {
#endif // WATCHDOG_RESET_MANUAL
#endif // USE_WATCHDOG
#endif // ARDUINO_ARCH_AVR
#endif // __AVR__