Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73c6beb

Browse files
committed
Display 328 emulation warning only once
1 parent 1c620dc commit 73c6beb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cores/arduino/UNO_compat.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@
1313
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1414
*/
1515

16+
#ifdef UNO_WIFI_REV2_328MODE
17+
1618
#include "UNO_compat.h"
1719

20+
#warning "ATMEGA328 registers emulation is enabled. You may encounter some speed issue. Please consider to disable it in the Tools menu"
21+
1822
PORTBClass PORTB;
1923
PORTCClass PORTC;
2024
PORTDClass PORTD;
2125

2226
DDRBClass DDRB;
2327
DDRCClass DDRC;
2428
DDRDClass DDRD;
29+
30+
#endif

cores/arduino/UNO_compat.h

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#pragma once
1717
#include "Arduino.h"
1818

19-
#warning "ATMEGA328 registers emulation is enabled. You may encounter some speed issue. Please consider to disable it in the Tools menu"
20-
2119
/*
2220
ARDUINO PIN ATMEGA 328 ATMEGA 4809
2321
0 PD0 PC5

0 commit comments

Comments
 (0)