MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / AtxPowerOff

Method AtxPowerOff

src/Platform/Platform.cpp:3397–3414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3395}
3396
3397void Platform::AtxPowerOff() noexcept
3398{
3399#if HAS_MASS_STORAGE
3400 if (logger != nullptr)
3401 {
3402 logger->LogMessage(realTime, "Power off commanded", LogWarn);
3403 logger->Flush(true);
3404 // We don't call logger->Stop() here because we don't know whether turning off the power will work
3405 }
3406#endif
3407
3408 // The PS_ON pin on Duet 3 is shared with another pin, so only try to turn off ATX power if we know that power is being controlled
3409 if (IsAtxPowerControlled())
3410 {
3411 PsOnPort.WriteDigital(false);
3412 reprap.StateUpdated();
3413 }
3414}
3415
3416void Platform::SetBaudRate(size_t chan, uint32_t br) noexcept
3417{

Callers 1

SpinMethod · 0.80

Calls 4

LogMessageMethod · 0.80
StateUpdatedMethod · 0.80
FlushMethod · 0.45
WriteDigitalMethod · 0.45

Tested by

no test coverage detected