21#ifndef LSHCORE_UTIL_DEBUG_DEBUG_HPP
22#define LSHCORE_UTIL_DEBUG_DEBUG_HPP
29#include <ArduinoJson.h>
39 inline auto FPSTR(
const char *
const progmemString) ->
const __FlashStringHelper *
41 return reinterpret_cast<const __FlashStringHelper *
>(progmemString);
50#define DP VaPrint::print
56#define DPL VaPrint::println
62 __attribute__((always_inline))
inline void DSB() { CONFIG_DEBUG_SERIAL->begin(constants::debugConfigs::DEBUG_SERIAL_BAUD); }
75 __attribute__((always_inline))
constexpr inline void DPJ(
const T &json)
77 serializeJson(json, Serial);
87 DPL(
FPSTR(dStr::FREE_MEMORY),
FPSTR(dStr::COLON_SPACE), freeMemory());
95#define DP_CONTEXT() DPL(__PRETTY_FUNCTION__)
101 extern bool serialIsActive;
Defines build-time configurable parameters for serial communication.
Defines constants, strings, and configuration parameters used for debugging.
auto FPSTR(const char *const progmemString) -> const __FlashStringHelper *
Helper to cast a PROGMEM string to const __FlashStringHelper *, needed to print PROGMEM strings.
Definition debug.hpp:39
Declares functions to check for free memory on AVR devices.
__attribute__((noinline)) inline void deviceReset()
Performs a hardware reset using the watchdog timer.
Definition reset.hpp:36
Internal bridge that imports user-defined macros into the library's scope.
Declares a variadic print utility for streamlined debugging output.