Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
954e2b3525 | ||
|
f994cab0c5 | ||
|
ee89abe4d7 |
10
NmraDcc.cpp
10
NmraDcc.cpp
@@ -267,6 +267,9 @@
|
||||
#elif defined ( ARDUINO_ARCH_RP2040)
|
||||
static PinStatus ISREdge; // Holder of the Next Edge we're looking for: RISING or FALLING
|
||||
static byte ISRWatch; // Interrupt Handler Edge Filter
|
||||
#elif defined ( ARDUINO_ARCH_RENESAS_UNO)
|
||||
static PinStatus ISREdge; // Holder of the Next Edge we're looking for: RISING or FALLING
|
||||
static byte ISRWatch; // Interrupt Handler Edge Filter
|
||||
#else
|
||||
static byte ISREdge; // Holder of the Next Edge we're looking for: RISING or FALLING
|
||||
static byte ISRWatch; // Interrupt Handler Edge Filter
|
||||
@@ -680,7 +683,7 @@ DCC_PROCESSOR_STATE DccProcState ;
|
||||
portENTER_CRITICAL_ISR (&mux);
|
||||
#endif
|
||||
DccRx.PacketCopy = DccRx.PacketBuf ;
|
||||
DccRx.DataReady = 1 ;
|
||||
DccRx.DataReady += 1 ;
|
||||
#ifdef ESP32
|
||||
portEXIT_CRITICAL_ISR (&mux);
|
||||
#endif
|
||||
@@ -1728,6 +1731,8 @@ void NmraDcc::setAccDecDCCAddrNextReceived (uint8_t enable)
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
uint8_t NmraDcc::process()
|
||||
{
|
||||
uint8_t copyDataReady ;
|
||||
|
||||
if (DccProcState.inServiceMode)
|
||||
{
|
||||
if ( (millis() - DccProcState.LastServiceModeMillis) > 20L)
|
||||
@@ -1745,6 +1750,7 @@ uint8_t NmraDcc::process()
|
||||
noInterrupts();
|
||||
#endif
|
||||
Msg = DccRx.PacketCopy ;
|
||||
copyDataReady = DccRx.DataReady;
|
||||
DccRx.DataReady = 0 ;
|
||||
|
||||
#ifdef ESP32
|
||||
@@ -1762,7 +1768,7 @@ uint8_t NmraDcc::process()
|
||||
if (notifyDccMsg) notifyDccMsg (&Msg);
|
||||
|
||||
execDccProcessor (&Msg);
|
||||
return 1 ;
|
||||
return copyDataReady ;
|
||||
}
|
||||
|
||||
return 0 ;
|
||||
|
@@ -128,6 +128,8 @@ typedef struct
|
||||
#define PRIO_SYSTIC 8 // MUST be higher priority than DCC Irq
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
#define MAXCV 256 // todo: maybe somebody knows a good define for it
|
||||
#elif defined ( ARDUINO_ARCH_RENESAS_UNO)
|
||||
#define MAXCV EEPROM.length()
|
||||
#elif defined(ARDUINO_SAMD_ZERO)
|
||||
#define MAXCV EEPROM_EMULATION_SIZE
|
||||
#else
|
||||
|
@@ -1,5 +1,5 @@
|
||||
name=NmraDcc
|
||||
version=2.0.16
|
||||
version=2.0.17
|
||||
author=Alex Shepherd, Wolfgang Kuffer, Geoff Bunza, Martin Pischky, Franz-Peter Müller, Sven (littleyoda), Hans Tanner, bugfixes by Jueff
|
||||
maintainer=Alex Shepherd <kiwi64ajs@gmail.com>
|
||||
sentence=Enables NMRA DCC Communication
|
||||
|
Reference in New Issue
Block a user