Implement UART debugging by reusing DEBUG_PRINT when ITW not active
This commit is contained in:
+6
-3
@@ -45,15 +45,18 @@ extern "C" {
|
||||
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN EM */
|
||||
//#define DEBUG_ITM
|
||||
//#define DEBUG_ITW
|
||||
//#define DEBUG_DUMMY_FRAME
|
||||
|
||||
#ifdef DEBUG_ITM
|
||||
#ifdef DEBUG_ITW
|
||||
#include <stdio.h>
|
||||
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
|
||||
#else
|
||||
#define DEBUG_PRINT(...)
|
||||
#include <stdarg.h>
|
||||
void uart_debug_print(const char *fmt, ...);
|
||||
#define DEBUG_PRINT(...) uart_debug_print(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
/* USER CODE END EM */
|
||||
|
||||
/* Exported functions prototypes ---------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user