From 8c2fdd0773a88daaa2e44813058c01de84a31ef5 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Tue, 10 Sep 2019 07:41:34 +0200 Subject: [PATCH 1/2] Bugfix - including 'NANO_Compat.h' within 'Arduino.h' if 'AVR_NANO_4809_328MODE' is defined --- cores/arduino/Arduino.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 1892a7a1..203a477f 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -143,6 +143,9 @@ bool isDoubleBondedActive(uint8_t pin); #ifdef UNO_WIFI_REV2_328MODE #include #endif +#ifdef AVR_NANO_4809_328MODE +#include +#endif #if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL) #error "Targets with both UART0 and CDC serial not supported" #endif From ebc7933d519e5248fc2b7d1cac365be55d297c6e Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Tue, 10 Sep 2019 07:48:09 +0200 Subject: [PATCH 2/2] Renaming 'NANO_Compat.h/cpp' to 'NANO_compat.h/cpp' for the naming scheme to be identical to 'UNO_compat.h/cpp' --- cores/arduino/Arduino.h | 2 +- cores/arduino/{NANO_Compat.cpp => NANO_compat.cpp} | 2 +- cores/arduino/{NANO_Compat.h => NANO_compat.h} | 0 cores/test/CMakeLists.txt | 2 +- cores/test/src/test_main.cpp | 14 +++++++------- 5 files changed, 10 insertions(+), 10 deletions(-) rename cores/arduino/{NANO_Compat.cpp => NANO_compat.cpp} (99%) rename cores/arduino/{NANO_Compat.h => NANO_compat.h} (100%) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 203a477f..16063a6a 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -144,7 +144,7 @@ bool isDoubleBondedActive(uint8_t pin); #include #endif #ifdef AVR_NANO_4809_328MODE -#include +#include #endif #if defined(HAVE_HWSERIAL0) && defined(HAVE_CDCSERIAL) #error "Targets with both UART0 and CDC serial not supported" diff --git a/cores/arduino/NANO_Compat.cpp b/cores/arduino/NANO_compat.cpp similarity index 99% rename from cores/arduino/NANO_Compat.cpp rename to cores/arduino/NANO_compat.cpp index f199125d..997d36e3 100644 --- a/cores/arduino/NANO_Compat.cpp +++ b/cores/arduino/NANO_compat.cpp @@ -16,7 +16,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "NANO_Compat.h" +#include "NANO_compat.h" #ifdef AVR_NANO_4809_328MODE diff --git a/cores/arduino/NANO_Compat.h b/cores/arduino/NANO_compat.h similarity index 100% rename from cores/arduino/NANO_Compat.h rename to cores/arduino/NANO_compat.h diff --git a/cores/test/CMakeLists.txt b/cores/test/CMakeLists.txt index 2605c248..bea90144 100644 --- a/cores/test/CMakeLists.txt +++ b/cores/test/CMakeLists.txt @@ -25,7 +25,7 @@ set(TEST_TARGET testArduinoCore-megaavr) set(TEST_SRCS src/test_main.cpp - ../arduino/NANO_Compat.cpp + ../arduino/NANO_compat.cpp ) ########################################################################## diff --git a/cores/test/src/test_main.cpp b/cores/test/src/test_main.cpp index 41adfe12..4b0d36da 100644 --- a/cores/test/src/test_main.cpp +++ b/cores/test/src/test_main.cpp @@ -19,11 +19,11 @@ #define CATCH_CONFIG_MAIN #include -#include "../../arduino/NANO_Compat.h" +#include "../../arduino/NANO_compat.h" /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 DDRB compatibility class", "NANO_Compat::DDRBClass") { +SCENARIO("Testing Arduino Nano 4809 DDRB compatibility class", "NANO_compat::DDRBClass") { PORT_t portb, porte; DDRBClass DDRB(&portb, &porte); @@ -63,7 +63,7 @@ SCENARIO("Testing Arduino Nano 4809 DDRB compatibility class", "NANO_Compat::DDR /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 PORTB compatibility class", "NANO_Compat::PORTBClass") { +SCENARIO("Testing Arduino Nano 4809 PORTB compatibility class", "NANO_compat::PORTBClass") { PORT_t portb, porte; PORTBClass PORTB(&portb, &porte); @@ -103,7 +103,7 @@ SCENARIO("Testing Arduino Nano 4809 PORTB compatibility class", "NANO_Compat::PO /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 DDRC compatibility class", "NANO_Compat::DDRCClass") { +SCENARIO("Testing Arduino Nano 4809 DDRC compatibility class", "NANO_compat::DDRCClass") { PORT_t porta, portd; DDRCClass DDRC(&porta, &portd); @@ -149,7 +149,7 @@ SCENARIO("Testing Arduino Nano 4809 DDRC compatibility class", "NANO_Compat::DDR /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 PORTC compatibility class", "NANO_Compat::PORTCClass") { +SCENARIO("Testing Arduino Nano 4809 PORTC compatibility class", "NANO_compat::PORTCClass") { PORT_t porta, portd; PORTCClass PORTC(&porta, &portd); @@ -195,7 +195,7 @@ SCENARIO("Testing Arduino Nano 4809 PORTC compatibility class", "NANO_Compat::PO /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 DDRD compatibility class", "NANO_Compat::DDRDClass") { +SCENARIO("Testing Arduino Nano 4809 DDRD compatibility class", "NANO_compat::DDRDClass") { PORT_t porta, portb, portc, portf; DDRDClass DDRD(&porta, &portb, &portc, &portf); @@ -245,7 +245,7 @@ SCENARIO("Testing Arduino Nano 4809 DDRD compatibility class", "NANO_Compat::DDR /*****************************************************************************/ -SCENARIO("Testing Arduino Nano 4809 PORTD compatibility class", "NANO_Compat::PORTDClass") { +SCENARIO("Testing Arduino Nano 4809 PORTD compatibility class", "NANO_compat::PORTDClass") { PORT_t porta, portb, portc, portf; PORTDClass PORTD(&porta, &portb, &portc, &portf);