Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2711,8 +2711,10 @@ void print_reset_reason(int reason) {
*/
/**************************************************************************/
void printDeviceInfo() {
WS_PRINTER.flush();
WS_DEBUG_PRINTLN("-------Device Information-------");
WS_DEBUG_PRINT("Firmware Version: ");
WS_PRINTER.flush();
WS_DEBUG_PRINTLN(WS_VERSION);
WS_DEBUG_PRINT("Board ID: ");
WS_DEBUG_PRINTLN(BOARD_ID);
Expand Down
38 changes: 35 additions & 3 deletions src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,49 @@

// Define actual debug output functions when necessary.
#ifdef WS_DEBUG
#if defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRWIFI1010)
#define WS_DEBUG_PRINT(...) \
{ WS_PRINTER.print(__VA_ARGS__); } ///< Prints debug output.
{ \
WS_PRINTER.print(__VA_ARGS__); \
yield(); \
} ///< Prints line from debug output.
#define WS_DEBUG_PRINTLN(...) \
{ \
WS_PRINTER.println(__VA_ARGS__); \
yield(); \
} ///< Prints line from debug output.
#define WS_DEBUG_PRINTHEX(...) \
{ \
WS_PRINTER.print(__VA_ARGS__, HEX); \
yield(); \
} ///< Prints debug output.
#else
#define WS_DEBUG_PRINT(...) \
{ \
WS_PRINTER.print(__VA_ARGS__); \
WS_PRINTER.flush(); \
yield(); \
} ///< Prints line from debug output.
#define WS_DEBUG_PRINTLN(...) \
{ WS_PRINTER.println(__VA_ARGS__); } ///< Prints line from debug output.
{ \
WS_PRINTER.println(__VA_ARGS__); \
WS_PRINTER.flush(); \
yield(); \
} ///< Prints line from debug output.
#define WS_DEBUG_PRINTHEX(...) \
{ WS_PRINTER.print(__VA_ARGS__, HEX); } ///< Prints debug output.
{ \
WS_PRINTER.print(__VA_ARGS__, HEX); \
WS_PRINTER.flush(); \
yield(); \
} ///< Prints debug output.
#endif
#else
#define WS_DEBUG_PRINT(...) \
{} ///< Prints debug output
#define WS_DEBUG_PRINTLN(...) \
{} ///< Prints line from debug output.
#define WS_DEBUG_PRINTHEX(...) \
{} ///< Prints debug output.
#endif

#define WS_DELAY_WITH_WDT(timeout) \
Expand Down
Loading