From 22d4fcf3b8562efa1009c69173ab1bde5997d859 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 12 Jul 2020 16:03:22 +0200 Subject: [PATCH] more ifdefs --- CVReader.ino | 8 +++++++- Config.h | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CVReader.ino b/CVReader.ino index 57f69cd..6ae7f53 100644 --- a/CVReader.ino +++ b/CVReader.ino @@ -71,8 +71,14 @@ DCCEXParser serialParser; // Try monitoring the memory #include "freeMemory.h" -//int minMemory=32767; +// TODO: this should be automated instead of ifdef +#if defined(ARDUINO_AVR_MEGA2560) +int minMemory=32767; +#elif defined(ARDUINO_AVR_UNO) int minMemory=2048; +#else +#error CANNOT COMPILE - Unkown board, can not determine amount of RAM available. +#endif void setup() { diff --git a/Config.h b/Config.h index 6e517f3..3018210 100644 --- a/Config.h +++ b/Config.h @@ -1,6 +1,9 @@ #ifndef Config_h #define Config_h +// Define this if you have a WiFi board on Serial1 +// #define WIFI + // This hardware configuration would normally be setup using a bunch of #ifdefs. const byte MAIN_POWER_PIN = 3;