Skip to content

Commit

Permalink
Consistently check for both ARDUINO_ARCH_AVR and __AVR__
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <[email protected]>
  • Loading branch information
SRGDamia1 committed Sep 18, 2024
1 parent 4f6a820 commit 86095af
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/menu_a_la_carte/menu_a_la_carte.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// peripherals as possible. In some cases (ie, modbus communication) many
// sensors can share the same serial port.

#if defined(ARDUINO_ARCH_AVR) || defined(__AVR__) // For AVR boards
#if defined(__AVR__) || defined(ARDUINO_ARCH_AVR) // For AVR boards
// Unfortunately, most AVR boards have only one or two hardware serial ports,
// so we'll set up three types of extra software serial ports to use

Expand Down
2 changes: 1 addition & 1 deletion src/LoggerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include <RTCZero.h>
#endif
#include "WatchDogs/WatchDogSAMD.h"
#elif defined(ARDUINO_ARCH_AVR) || defined(__AVR__)
#elif defined(__AVR__) || defined(ARDUINO_ARCH_AVR)
#include <avr/power.h>
#include <avr/sleep.h>
#include "WatchDogs/WatchDogAVR.h"
Expand Down
2 changes: 1 addition & 1 deletion src/ModSensorInterrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <Arduino.h>

#if defined(__AVR__)
#if defined(__AVR__) || defined(ARDUINO_ARCH_AVR)
// #define LIBCALL_ENABLEINTERRUPT // To prevent compiler/linker crashes
#include <EnableInterrupt.h> // To handle external and pin change interrupts
#else
Expand Down
2 changes: 1 addition & 1 deletion src/WatchDogs/WatchDogAVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// Be careful to use a platform-specific conditional include to only make the
// code visible for the appropriate platform. Arduino will try to compile and
// link all .cpp files regardless of platform.
#if defined(ARDUINO_ARCH_AVR) || defined(__AVR__)
#if defined(__AVR__) || defined(ARDUINO_ARCH_AVR)

#include <avr/interrupt.h>
#include <avr/wdt.h>
Expand Down

2 comments on commit 86095af

@SRGDamia1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aufdenkampe This is what was throwing off the library dependency finder.

@aufdenkampe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Thanks for sleuthing that out!

Please sign in to comment.