|
30 | 30 | #define NTP_USE_RANDOM_PORT (1) |
31 | 31 | #endif |
32 | 32 |
|
33 | | -#ifndef DBG_ERROR |
34 | | - #define DBG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__) |
| 33 | +#ifndef DEBUG_ERROR |
| 34 | +# if defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 35 | +# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__) |
| 36 | +# else |
| 37 | +# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__) |
| 38 | +# endif |
35 | 39 | #endif |
36 | 40 |
|
37 | | -#ifndef DBG_WARNING |
38 | | - #define DBG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__) |
| 41 | +#ifndef DEBUG_WARNING |
| 42 | +# if defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 43 | +# define DEBUG_WARNING(fmt, ...) |
| 44 | +# else |
| 45 | +# define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__) |
| 46 | +# endif |
39 | 47 | #endif |
40 | 48 |
|
41 | | -#ifndef DBG_INFO |
42 | | - #define DBG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__) |
| 49 | +#ifndef DEBUG_INFO |
| 50 | +# if defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 51 | +# define DEBUG_INFO(fmt, ...) |
| 52 | +# else |
| 53 | +# define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__) |
| 54 | +# endif |
43 | 55 | #endif |
44 | 56 |
|
45 | | -#ifndef DBG_DEBUG |
46 | | - #define DBG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__) |
| 57 | +#ifndef DEBUG_DEBUG |
| 58 | +# if defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 59 | +# define DEBUG_DEBUG(fmt, ...) |
| 60 | +# else |
| 61 | +# define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__) |
| 62 | +# endif |
47 | 63 | #endif |
48 | 64 |
|
49 | | -#ifndef DBG_VERBOSE |
50 | | - #define DBG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__) |
| 65 | +#ifndef DEBUG_VERBOSE |
| 66 | +# if defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 67 | +# define DEBUG_VERBOSE(fmt, ...) |
| 68 | +# else |
| 69 | +# define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__) |
| 70 | +# endif |
| 71 | +#endif |
| 72 | + |
| 73 | +#if defined(ARDUINO_AVR_UNO_WIFI_REV2) && !(defined(DEBUG_ERROR) || defined(DEBUG_WARNING) || defined(DEBUG_INFO) || defined(DEBUG_DEBUG) || defined(DEBUG_VERBOSE)) |
| 74 | +/* Provide defines for constants provided within Arduino_DebugUtils |
| 75 | + * in order to allow older sketches using those constants to still |
| 76 | + * compile. |
| 77 | + */ |
| 78 | +# define DBG_NONE -1 |
| 79 | +# define DBG_ERROR 0 |
| 80 | +# define DBG_WARNING 1 |
| 81 | +# define DBG_INFO 2 |
| 82 | +# define DBG_DEBUG 3 |
| 83 | +# define DBG_VERBOSE 4 |
51 | 84 | #endif |
52 | 85 |
|
53 | 86 | /****************************************************************************** |
54 | 87 | * AUTOMATICALLY CONFIGURED DEFINES |
55 | 88 | ******************************************************************************/ |
56 | 89 |
|
57 | | -#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) |
| 90 | +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ |
| 91 | + defined(ARDUINO_AVR_UNO_WIFI_REV2) |
58 | 92 | #define OTA_STORAGE_SNU (1) |
59 | 93 | #else |
60 | 94 | #define OTA_STORAGE_SNU (0) |
|
66 | 100 | #define OTA_STORAGE_SSU (0) |
67 | 101 | #endif |
68 | 102 |
|
69 | | -#if OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU |
| 103 | +#if (OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU) && !defined(ARDUINO_AVR_UNO_WIFI_REV2) |
70 | 104 | #define OTA_ENABLED (1) |
71 | 105 | #else |
72 | 106 | #define OTA_ENABLED (0) |
73 | 107 | #endif |
74 | 108 |
|
75 | | -#if defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKRWIFI1010) || \ |
76 | | - defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ |
| 109 | +#if defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \ |
77 | 110 | defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \ |
78 | 111 | defined(ARDUINO_PORTENTA_H7_M4) |
79 | 112 | #define BOARD_HAS_ECCX08 |
80 | 113 | #define HAS_TCP |
81 | 114 | #endif |
82 | 115 |
|
| 116 | +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ |
| 117 | + defined(ARDUINO_AVR_UNO_WIFI_REV2) |
| 118 | + #define BOARD_HAS_OFFLOADED_ECCX08 |
| 119 | + #define HAS_TCP |
| 120 | +#endif |
| 121 | + |
83 | 122 | #if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) |
84 | 123 | #define HAS_LORA |
85 | 124 | #endif |
|
0 commit comments