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