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-09-23 13:18:57 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-09-23 13:18:57 +0300
commitc006deccbb21f48c7ece8c496dfd492c2ba739a2 (patch)
tree6ff83beebb9133528f87efa248e20c2132c946c3 /src/Platform
parent547a0a987ea54acdfa955c85ccb23ba1810416a4 (diff)
Terminate accelerometer task when doing firmware update or estop
Diffstat (limited to 'src/Platform')
-rw-r--r--src/Platform/RepRap.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp
index 639b6bab..ef9fef08 100644
--- a/src/Platform/RepRap.cpp
+++ b/src/Platform/RepRap.cpp
@@ -21,6 +21,7 @@
#include "Fans/FansManager.h"
#include <Hardware/SoftwareReset.h>
#include <Hardware/ExceptionHandlers.h>
+#include <Accelerometers/Accelerometers.h>
#include "Version.h"
#ifdef DUET_NG
@@ -714,6 +715,9 @@ void RepRap::Exit() noexcept
#endif
network->Exit();
platform->Exit();
+#if SUPPORT_ACCELEROMETERS
+ Accelerometers::Exit();
+#endif
}
void RepRap::Spin() noexcept
@@ -2818,6 +2822,9 @@ void RepRap::PrepareToLoadIap() noexcept
SmartDrivers::Exit(); // stop the drivers being polled via SPI or UART because it may use data in the last 64Kb of RAM
FilamentMonitor::Exit(); // stop the filament monitors generating interrupts, we may be about to overwrite them
fansManager->Exit(); // stop the fan tachos generating interrupts, we may be about to overwrite them
+#if SUPPORT_ACCELEROMETERS
+ Accelerometers::Exit(); // terminate the accelerometer task, if any
+#endif
if (RTOSIface::GetCurrentTask() != Tasks::GetMainTask())
{
Tasks::TerminateMainTask(); // stop the main task if IAP is being written from another task