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

Method SetMode

src/Comms/AuxDevice.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void AuxDevice::SetMode(AuxMode p_mode) noexcept
33{
34 if (uart != nullptr)
35 {
36 if (p_mode == AuxMode::disabled)
37 {
38 Disable();
39 }
40 else
41 {
42#if SUPPORT_MODBUS_RTU
43 uart->SetOnTxEndedCallback((p_mode == AuxMode::device) ? GlobalTxEndedCallback : nullptr, CallbackParameter(this));
44#endif
45 uart->begin(baudRate);
46 mode = p_mode;
47 }
48 }
49}
50
51void AuxDevice::Disable() noexcept
52{

Callers 4

Platform.cppFile · 0.45
EnablePanelDuePortMethod · 0.45
ResetChannelMethod · 0.45
THROWSFunction · 0.45

Calls 1

beginMethod · 0.45

Tested by

no test coverage detected