|
46 | 46 |
|
47 | 47 | // Define actual debug output functions when necessary.
|
48 | 48 | #ifdef WS_DEBUG
|
| 49 | +#if defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRWIFI1010) |
49 | 50 | #define WS_DEBUG_PRINT(...) \
|
50 |
| - { WS_PRINTER.print(__VA_ARGS__); } ///< Prints debug output. |
| 51 | + { WS_PRINTER.print(__VA_ARGS__); yield(); } ///< Prints line from debug output. |
51 | 52 | #define WS_DEBUG_PRINTLN(...) \
|
52 |
| - { WS_PRINTER.println(__VA_ARGS__); } ///< Prints line from debug output. |
| 53 | + { WS_PRINTER.println(__VA_ARGS__); yield(); } ///< Prints line from debug output. |
53 | 54 | #define WS_DEBUG_PRINTHEX(...) \
|
54 |
| - { WS_PRINTER.print(__VA_ARGS__, HEX); } ///< Prints debug output. |
| 55 | + { WS_PRINTER.print(__VA_ARGS__, HEX); yield(); } ///< Prints debug output. |
| 56 | +#else |
| 57 | +#define WS_DEBUG_PRINT(...) \ |
| 58 | + { WS_PRINTER.print(__VA_ARGS__); WS_PRINTER.flush(); yield(); } ///< Prints line from debug output. |
| 59 | +#define WS_DEBUG_PRINTLN(...) \ |
| 60 | + { WS_PRINTER.println(__VA_ARGS__); WS_PRINTER.flush(); yield(); } ///< Prints line from debug output. |
| 61 | +#define WS_DEBUG_PRINTHEX(...) \ |
| 62 | + { WS_PRINTER.print(__VA_ARGS__, HEX); WS_PRINTER.flush(); yield(); } ///< Prints debug output. |
| 63 | +#endif |
55 | 64 | #else
|
56 | 65 | #define WS_DEBUG_PRINT(...) \
|
57 | 66 | {} ///< Prints debug output
|
58 | 67 | #define WS_DEBUG_PRINTLN(...) \
|
59 | 68 | {} ///< Prints line from debug output.
|
| 69 | +#define WS_DEBUG_PRINTHEX(...) \ |
| 70 | + {} ///< Prints debug output. |
60 | 71 | #endif
|
61 | 72 |
|
62 | 73 | #define WS_DELAY_WITH_WDT(timeout) \
|
|
0 commit comments