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:
@ -88,7 +88,7 @@ void recalc_delta_settings(float radius, float diagonal_rod) {
|
||||
* (see above)
|
||||
*/
|
||||
|
||||
#if ENABLED(DELTA_FAST_SQRT) && defined(ARDUINO_ARCH_AVR)
|
||||
#if ENABLED(DELTA_FAST_SQRT) && defined(__AVR__)
|
||||
/**
|
||||
* Fast inverse sqrt from Quake III Arena
|
||||
* See: https://en.wikipedia.org/wiki/Fast_inverse_square_root
|
||||
|
@ -63,7 +63,7 @@ void recalc_delta_settings(float radius, float diagonal_rod);
|
||||
* (see above)
|
||||
*/
|
||||
|
||||
#if ENABLED(DELTA_FAST_SQRT) && defined(ARDUINO_ARCH_AVR)
|
||||
#if ENABLED(DELTA_FAST_SQRT) && defined(__AVR__)
|
||||
/**
|
||||
* Fast inverse sqrt from Quake III Arena
|
||||
* See: https://en.wikipedia.org/wiki/Fast_inverse_square_root
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#include "stepper.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_AVR
|
||||
#ifdef __AVR__
|
||||
#include "speed_lookuptable.h"
|
||||
#endif
|
||||
|
||||
@ -1139,7 +1139,7 @@ void Stepper::init() {
|
||||
E_AXIS_INIT(4);
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_AVR
|
||||
#ifdef __AVR__
|
||||
// waveform generation = 0100 = CTC
|
||||
SET_WGM(1, CTC_OCRnA);
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
#include "stepper_indirection.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_AVR
|
||||
#ifdef __AVR__
|
||||
#include "speed_lookuptable.h"
|
||||
#endif
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ void Temperature::init() {
|
||||
#endif
|
||||
|
||||
// todo: HAL: fix abstraction
|
||||
#ifdef ARDUINO_ARCH_AVR
|
||||
#ifdef __AVR__
|
||||
// Use timer0 for temperature measurement
|
||||
// Interleave temperature interrupt with millies interrupt
|
||||
OCR0B = 128;
|
||||
|
Reference in New Issue
Block a user