diff options
Diffstat (limited to 'src/InputMonitors')
-rw-r--r-- | src/InputMonitors/InputMonitor.cpp | 7 |
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(); |