Skip to content

Commit

Permalink
Merge pull request #413 from pennam/avr_cleanup
Browse files Browse the repository at this point in the history
Remove remaining ARDUINO_AVR_UNO_WIFI_REV2 configuration defines
  • Loading branch information
pennam authored Feb 19, 2024
2 parents 5bd7a1d + 094453c commit c2a9992
Showing 1 changed file with 8 additions and 43 deletions.
51 changes: 8 additions & 43 deletions src/AIoTC_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,64 +29,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 @@ -114,7 +80,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 @@ -133,8 +99,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

0 comments on commit c2a9992

Please sign in to comment.