Skip to content

Commit c2a9992

Browse files
authored
Merge pull request #413 from pennam/avr_cleanup
Remove remaining ARDUINO_AVR_UNO_WIFI_REV2 configuration defines
2 parents 5bd7a1d + 094453c commit c2a9992

File tree

1 file changed

+8
-43
lines changed

1 file changed

+8
-43
lines changed

src/AIoTC_Config.h

+8-43
Original file line numberDiff line numberDiff line change
@@ -29,64 +29,30 @@
2929
#endif
3030

3131
#ifndef DEBUG_ERROR
32-
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
33-
# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
34-
# else
35-
# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
36-
# endif
32+
#define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
3733
#endif
3834

3935
#ifndef DEBUG_WARNING
40-
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
41-
# define DEBUG_WARNING(fmt, ...)
42-
# else
43-
# define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
44-
# endif
36+
#define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
4537
#endif
4638

4739
#ifndef DEBUG_INFO
48-
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
49-
# define DEBUG_INFO(fmt, ...)
50-
# else
51-
# define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
52-
# endif
40+
#define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
5341
#endif
5442

5543
#ifndef DEBUG_DEBUG
56-
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
57-
# define DEBUG_DEBUG(fmt, ...)
58-
# else
59-
# define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
60-
# endif
44+
#define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
6145
#endif
6246

6347
#ifndef DEBUG_VERBOSE
64-
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
65-
# define DEBUG_VERBOSE(fmt, ...)
66-
# else
67-
# define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
68-
# endif
69-
#endif
70-
71-
#if defined(ARDUINO_AVR_UNO_WIFI_REV2) && !(defined(DEBUG_ERROR) || defined(DEBUG_WARNING) || defined(DEBUG_INFO) || defined(DEBUG_DEBUG) || defined(DEBUG_VERBOSE))
72-
/* Provide defines for constants provided within Arduino_DebugUtils
73-
* in order to allow older sketches using those constants to still
74-
* compile.
75-
*/
76-
# define DBG_NONE -1
77-
# define DBG_ERROR 0
78-
# define DBG_WARNING 1
79-
# define DBG_INFO 2
80-
# define DBG_DEBUG 3
81-
# define DBG_VERBOSE 4
48+
#define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
8249
#endif
8350

8451
/******************************************************************************
8552
* AUTOMATICALLY CONFIGURED DEFINES
8653
******************************************************************************/
8754

88-
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \
89-
defined(ARDUINO_AVR_UNO_WIFI_REV2)
55+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
9056
#define OTA_STORAGE_SNU (1)
9157
#else
9258
#define OTA_STORAGE_SNU (0)
@@ -114,7 +80,7 @@
11480
#define OTA_STORAGE_ESP (1)
11581
#endif
11682

117-
#if (OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU || OTA_STORAGE_PORTENTA_QSPI || OTA_STORAGE_ESP) && !defined(ARDUINO_AVR_UNO_WIFI_REV2)
83+
#if (OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU || OTA_STORAGE_PORTENTA_QSPI || OTA_STORAGE_ESP)
11884
#define OTA_ENABLED (1)
11985
#else
12086
#define OTA_ENABLED (0)
@@ -133,8 +99,7 @@
13399
#define HAS_TCP
134100
#endif
135101

136-
#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \
137-
defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
102+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
138103
#define BOARD_HAS_OFFLOADED_ECCX08
139104
#define HAS_TCP
140105
#endif

0 commit comments

Comments
 (0)