Send a debug message to USB using minimal stack
| 3205 | |
| 3206 | // Send a debug message to USB using minimal stack |
| 3207 | void 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 |
no test coverage detected