From 11d959c8d011ebf4c16bc56883dbc0d0bbe1e20f Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Mon, 6 Jun 2022 23:51:06 +0200 Subject: [PATCH] make compile on Uno --- GITHUB_SHA.h | 2 +- MotorDriver.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GITHUB_SHA.h b/GITHUB_SHA.h index bc83b7f..4ab389b 100644 --- a/GITHUB_SHA.h +++ b/GITHUB_SHA.h @@ -1 +1 @@ -#define GITHUB_SHA "TM-PORTX-20220606" +#define GITHUB_SHA "TM-PORTX-20220606-1" diff --git a/MotorDriver.cpp b/MotorDriver.cpp index bd190e1..fd1a3d0 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -183,23 +183,23 @@ void MotorDriver::setDCSignal(byte speedcode) { if (HAVE_PORTA(fastSignalPin.shadowinout == &PORTA)) { DIAG(F("setDCSignal: HAVEPORTA")); noInterrupts(); - fakePORTA=PORTA; + HAVE_PORTA(fakePORTA=PORTA); setSignal(tDir); - PORTA=fakePORTA; + HAVE_PORTA(PORTA=fakePORTA); interrupts(); } else if (HAVE_PORTB(fastSignalPin.shadowinout == &PORTB)) { DIAG(F("setDCSignal: HAVEPORTB")); noInterrupts(); - fakePORTB=PORTB; + HAVE_PORTB(fakePORTB=PORTB); setSignal(tDir); - PORTB=fakePORTB; + HAVE_PORTB(PORTB=fakePORTB); interrupts(); } else if (HAVE_PORTC(fastSignalPin.shadowinout == &PORTC)) { DIAG(F("setDCSignal: HAVEPORTC")); noInterrupts(); - fakePORTC=PORTC; + HAVE_PORTC(fakePORTC=PORTC); setSignal(tDir); - PORTC=fakePORTC; + HAVE_PORTC(PORTC=fakePORTC); interrupts(); } }