Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-02-05 12:27:33 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-02-05 12:27:33 +0300
commit6351882b67bede9e19d64f7caa5e965568c1803c (patch)
tree4c01987841f65212132643eb500da96a6b0feac4 /src/InputMonitors
parent21b914a3d3d2c980d22b77c3c0776ad0f23a0244 (diff)
Enabled remote commands on Duet 3 MB6HC
Diffstat (limited to 'src/InputMonitors')
-rw-r--r--src/InputMonitors/InputMonitor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/InputMonitors/InputMonitor.cpp b/src/InputMonitors/InputMonitor.cpp
index 5bc4a97e..45e6a9a3 100644
--- a/src/InputMonitors/InputMonitor.cpp
+++ b/src/InputMonitors/InputMonitor.cpp
@@ -35,7 +35,12 @@ bool InputMonitor::Activate(bool useInterrupt) noexcept
{
// Analog port
state = port.ReadAnalog() >= threshold;
- ok = port.SetAnalogCallback(CommonAnalogPortInterrupt, CallbackParameter(this), 1);
+ ok =
+#if SAME5x
+ !useInterrupt || port.SetAnalogCallback(CommonAnalogPortInterrupt, CallbackParameter(this), 1);
+#else
+ true; // SAME70 doesn't support SetAnalogCallback yet
+#endif
}
active = true;
whenLastSent = millis();