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

Method ResetChannel

src/Platform/Platform.cpp:3436–3456  ·  view source on GitHub ↗

Re-initialise a serial channel.

Source from the content-addressed store, hash-verified

3434
3435// Re-initialise a serial channel.
3436void Platform::ResetChannel(size_t chan) noexcept
3437{
3438 if (chan == 0)
3439 {
3440 SERIAL_MAIN_DEVICE.end();
3441#if SAME5x && !CORE_USES_TINYUSB
3442 SERIAL_MAIN_DEVICE.Start();
3443#else
3444 SERIAL_MAIN_DEVICE.Start(UsbVBusPin);
3445#endif
3446 }
3447#if HAS_AUX_DEVICES
3448 else if (chan < NumSerialChannels)
3449 {
3450 AuxDevice& device = auxDevices[chan - FirstAuxChannel];
3451 AuxMode mode = device.GetMode();
3452 device.Disable();
3453 device.SetMode(mode);
3454 }
3455#endif
3456}
3457
3458#if defined(DUET3_MB6HC)
3459

Callers 1

SpinMethod · 0.80

Calls 5

endMethod · 0.80
StartMethod · 0.45
GetModeMethod · 0.45
DisableMethod · 0.45
SetModeMethod · 0.45

Tested by

no test coverage detected