From 56d871fdc14f088ea191320190864978cf0eeca4 Mon Sep 17 00:00:00 2001 From: Alex Pelts Date: Sat, 16 May 2020 20:52:58 -0700 Subject: [PATCH] Small fix to compile on megaavr boards like Arduino WiFi Rev2 --- Atmega_Board_Detector/ICSP_Utils.ino | 2 ++ Atmega_Board_Programmer/ICSP_Utils.ino | 2 ++ Atmega_Hex_Uploader/ICSP_Utils.ino | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Atmega_Board_Detector/ICSP_Utils.ino b/Atmega_Board_Detector/ICSP_Utils.ino index 0252893..77257c7 100644 --- a/Atmega_Board_Detector/ICSP_Utils.ino +++ b/Atmega_Board_Detector/ICSP_Utils.ino @@ -301,10 +301,12 @@ void initPins () // set up 8 MHz timer on pin 9 pinMode (CLOCKOUT, OUTPUT); +#ifndef ARDUINO_ARCH_MEGAAVR // set up Timer 1 TCCR1A = bit (COM1A0); // toggle OC1A on Compare Match TCCR1B = bit (WGM12) | bit (CS10); // CTC, no prescaling OCR1A = 0; // output every cycle +#endif diff --git a/Atmega_Board_Programmer/ICSP_Utils.ino b/Atmega_Board_Programmer/ICSP_Utils.ino index 0252893..77257c7 100644 --- a/Atmega_Board_Programmer/ICSP_Utils.ino +++ b/Atmega_Board_Programmer/ICSP_Utils.ino @@ -301,10 +301,12 @@ void initPins () // set up 8 MHz timer on pin 9 pinMode (CLOCKOUT, OUTPUT); +#ifndef ARDUINO_ARCH_MEGAAVR // set up Timer 1 TCCR1A = bit (COM1A0); // toggle OC1A on Compare Match TCCR1B = bit (WGM12) | bit (CS10); // CTC, no prescaling OCR1A = 0; // output every cycle +#endif diff --git a/Atmega_Hex_Uploader/ICSP_Utils.ino b/Atmega_Hex_Uploader/ICSP_Utils.ino index 0252893..77257c7 100644 --- a/Atmega_Hex_Uploader/ICSP_Utils.ino +++ b/Atmega_Hex_Uploader/ICSP_Utils.ino @@ -301,10 +301,12 @@ void initPins () // set up 8 MHz timer on pin 9 pinMode (CLOCKOUT, OUTPUT); +#ifndef ARDUINO_ARCH_MEGAAVR // set up Timer 1 TCCR1A = bit (COM1A0); // toggle OC1A on Compare Match TCCR1B = bit (WGM12) | bit (CS10); // CTC, no prescaling OCR1A = 0; // output every cycle +#endif