Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining ARDUINO_AVR_UNO_WIFI_REV2 configuration defines #413

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 8 additions & 43 deletions src/AIoTC_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,64 +27,30 @@
#endif

#ifndef DEBUG_ERROR
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
# else
# define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
# endif
#define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_WARNING
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
# define DEBUG_WARNING(fmt, ...)
# else
# define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
# endif
#define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_INFO
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
# define DEBUG_INFO(fmt, ...)
# else
# define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
# endif
#define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_DEBUG
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
# define DEBUG_DEBUG(fmt, ...)
# else
# define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
# endif
#define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
#endif

#ifndef DEBUG_VERBOSE
# if defined(ARDUINO_AVR_UNO_WIFI_REV2)
# define DEBUG_VERBOSE(fmt, ...)
# else
# define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
# endif
#endif

#if defined(ARDUINO_AVR_UNO_WIFI_REV2) && !(defined(DEBUG_ERROR) || defined(DEBUG_WARNING) || defined(DEBUG_INFO) || defined(DEBUG_DEBUG) || defined(DEBUG_VERBOSE))
/* Provide defines for constants provided within Arduino_DebugUtils
* in order to allow older sketches using those constants to still
* compile.
*/
# define DBG_NONE -1
# define DBG_ERROR 0
# define DBG_WARNING 1
# define DBG_INFO 2
# define DBG_DEBUG 3
# define DBG_VERBOSE 4
#define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
#endif

/******************************************************************************
* AUTOMATICALLY CONFIGURED DEFINES
******************************************************************************/

#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \
defined(ARDUINO_AVR_UNO_WIFI_REV2)
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
#define OTA_STORAGE_SNU (1)
#else
#define OTA_STORAGE_SNU (0)
Expand Down Expand Up @@ -112,7 +78,7 @@
#define OTA_STORAGE_ESP (1)
#endif

#if (OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU || OTA_STORAGE_PORTENTA_QSPI || OTA_STORAGE_ESP) && !defined(ARDUINO_AVR_UNO_WIFI_REV2)
#if (OTA_STORAGE_SFU || OTA_STORAGE_SSU || OTA_STORAGE_SNU || OTA_STORAGE_PORTENTA_QSPI || OTA_STORAGE_ESP)
#define OTA_ENABLED (1)
#else
#define OTA_ENABLED (0)
Expand All @@ -131,8 +97,7 @@
#define HAS_TCP
#endif

#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \
defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT)
#define BOARD_HAS_OFFLOADED_ECCX08
#define HAS_TCP
#endif
Expand Down
Loading