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

Method DebugMessage

src/Platform/Platform.cpp:3207–3228  ·  view source on GitHub ↗

Send a debug message to USB using minimal stack

Source from the content-addressed store, hash-verified

3205
3206// Send a debug message to USB using minimal stack
3207void Platform::DebugMessage(const char *_ecv_array fmt, va_list vargs) noexcept
3208{
3209 MutexLocker lock(usbMutex);
3210 vuprintf([](char c) -> bool
3211 {
3212 if (c != 0)
3213 {
3214 while (SERIAL_MAIN_DEVICE.IsConnected() && !reprap.SpinTimeoutImminent())
3215 {
3216 if (SERIAL_MAIN_DEVICE.canWrite() != 0)
3217 {
3218 SERIAL_MAIN_DEVICE.write(c);
3219 return true;
3220 }
3221 }
3222 }
3223 return false;
3224 },
3225 fmt,
3226 vargs
3227 );
3228}
3229
3230#if HAS_MASS_STORAGE
3231

Callers 1

debugPrintfFunction · 0.80

Calls 2

SpinTimeoutImminentMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected