Variadic DEBUG macro

This commit is contained in:
Imbus 2024-03-24 04:06:27 +01:00
parent 7e4643e789
commit 5d5cdaca5a

4
uart.h
View file

@ -3,9 +3,9 @@
// Define DEBUG_UART_ENABLED to enable debug messages // Define DEBUG_UART_ENABLED to enable debug messages
#ifdef DEBUG_UART_ENABLED #ifdef DEBUG_UART_ENABLED
#define DEBUG(message) UART_println(message) #define DEBUG(...) UART_println(__VA_ARGS__)
#else #else
#define DEBUG(message) ((void)0) // Define as no operation (NOP) #define DEBUG(...) ((void)0) // Define as no operation (NOP)
#endif #endif
#include <stdint.h> #include <stdint.h>