mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 10:27:34 +00:00
Big assert / debug clean up
This commit is contained in:
40
include/sta/debug/debug.hpp
Normal file
40
include/sta/debug/debug.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef STA_CORE_DEBUGGING_HPP
|
||||
#define STA_CORE_DEBUGGING_HPP
|
||||
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_DEBUGGING_ENABLED
|
||||
|
||||
#include <sta/debug/printing/printable.hpp>
|
||||
|
||||
namespace sta
|
||||
{
|
||||
extern Printable * Debug;
|
||||
} // namespace sta
|
||||
|
||||
|
||||
/**
|
||||
* @brief Debug print message.
|
||||
*
|
||||
* @param ... See @ref sta::PrintableUART::print
|
||||
*
|
||||
* @ingroup sta_core_debug
|
||||
*/
|
||||
# define STA_DEBUG_PRINT(...) sta::Debug->print(__VA_ARGS__)
|
||||
|
||||
/**
|
||||
* @brief Debug print message followed by new-line to UART.
|
||||
*
|
||||
* @param ... See @ref sta::PrintableUART::println
|
||||
*
|
||||
* @ingroup sta_core_debug
|
||||
*/
|
||||
# define STA_DEBUG_PRINTLN(...) sta::Debug->println(__VA_ARGS__)
|
||||
|
||||
#else // !STA_DEBUGGING_ENABLED
|
||||
|
||||
# define STA_DEBUG_PRINT(...) ((void)0)
|
||||
# define STA_DEBUG_PRINTLN(...) ((void)0)
|
||||
|
||||
#endif // STA_DEBUGGING_ENABLED
|
||||
|
||||
#endif // STA_CORE_DEBUGGING_HPP
|
Reference in New Issue
Block a user