From 43164136185a55edd2ff5f06997913d59d6b988c Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 30 Jul 2022 23:02:26 +0200 Subject: [PATCH] compiles (but no waveform) on ESP32 --- DCCTimerESP.cpp | 4 +++- DCCWaveform.cpp | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/DCCTimerESP.cpp b/DCCTimerESP.cpp index 0f83ef2..9780a4d 100644 --- a/DCCTimerESP.cpp +++ b/DCCTimerESP.cpp @@ -101,6 +101,8 @@ bool IRAM_ATTR DCCTimer::isPWMPin(byte pin) { } void IRAM_ATTR DCCTimer::setPWM(byte pin, bool high) { } +void IRAM_ATTR DCCTimer::clearPWM() { +} // Fake this as it should not be used void DCCTimer::getSimulatedMacAddress(byte mac[6]) { @@ -126,7 +128,7 @@ int DCCTimer::freeMemory() { return ESP.getFreeHeap(); } -void DCCTimmer:: reset() { +void DCCTimer::reset() { ESP.restart(); } #endif diff --git a/DCCWaveform.cpp b/DCCWaveform.cpp index bc80809..3708da1 100644 --- a/DCCWaveform.cpp +++ b/DCCWaveform.cpp @@ -192,3 +192,20 @@ void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repea sentResetsSincePacket=0; } #endif + +#ifdef ARDUINO_ARCH_ESP32 +#include "DCCWaveform.h" + +DCCWaveform DCCWaveform::mainTrack(PREAMBLE_BITS_MAIN, true); +DCCWaveform DCCWaveform::progTrack(PREAMBLE_BITS_PROG, false); + +DCCWaveform::DCCWaveform(byte preambleBits, bool isMain) { +} + +void DCCWaveform::begin() { +} +void DCCWaveform::schedulePacket(const byte buffer[], byte byteCount, byte repeats) { +} +void DCCWaveform::loop() { +} +#endif