From a84eba7ab622b0b7c10578f978edd4ad05410b14 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Sat, 21 Oct 2023 06:45:52 -0400 Subject: [PATCH] fixing a few stale placeholders --- DCCTimer.h | 4 +++- DCCTimerGiga.cpp | 2 +- defines.h | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/DCCTimer.h b/DCCTimer.h index 4a8e4a4..e595add 100644 --- a/DCCTimer.h +++ b/DCCTimer.h @@ -88,8 +88,10 @@ private: static int freeMemory(); static volatile int minimum_free_memory; static const int DCC_SIGNAL_TIME=58; // this is the 58uS DCC 1-bit waveform half-cycle -#if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_GIGA) // TODO: PMA temporary hack - assumes 100Mhz F_CPU as STM32 can change frequency +#if defined(ARDUINO_ARCH_STM32) // TODO: PMA temporary hack - assumes 100Mhz F_CPU as STM32 can change frequency static const long CLOCK_CYCLES=(100000000L / 1000000 * DCC_SIGNAL_TIME) >>1; +#elif defined(ARDUINO_GIGA) + static const long CLOCK_CYCLES=(480000000L / 1000000 * DCC_SIGNAL_TIME) >>1; #else static const long CLOCK_CYCLES=(F_CPU / 1000000 * DCC_SIGNAL_TIME) >>1; #endif diff --git a/DCCTimerGiga.cpp b/DCCTimerGiga.cpp index 394800d..6fdaacf 100644 --- a/DCCTimerGiga.cpp +++ b/DCCTimerGiga.cpp @@ -256,7 +256,7 @@ void DCCTimer::reset() { int16_t ADCee::ADCmax() { - return 4095; + return 1024; } int ADCee::init(uint8_t pin) { diff --git a/defines.h b/defines.h index 72430c5..c542182 100644 --- a/defines.h +++ b/defines.h @@ -152,9 +152,9 @@ #ifndef DISABLE_EEPROM #define DISABLE_EEPROM #endif - #if !defined(I2C_USE_WIRE) - #define I2C_USE_WIRE - #endif + //#if !defined(I2C_USE_WIRE) + //#define I2C_USE_WIRE + //#endif #define SDA I2C_SDA #define SCL I2C_SCL