From 930de79000dca5b13357a0bc668f1e1d1d63bc9a Mon Sep 17 00:00:00 2001 From: armink Date: Sat, 13 Jun 2020 11:36:12 +0800 Subject: [PATCH] [SFUD] Update the log format to rtdbg. --- components/drivers/spi/sfud/inc/sfud_cfg.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/drivers/spi/sfud/inc/sfud_cfg.h b/components/drivers/spi/sfud/inc/sfud_cfg.h index 3b7860062d..01255775c8 100644 --- a/components/drivers/spi/sfud/inc/sfud_cfg.h +++ b/components/drivers/spi/sfud/inc/sfud_cfg.h @@ -38,6 +38,18 @@ #define SFUD_DEBUG_MODE #endif +#ifdef RT_DEBUG_SFUD +#define DBG_LVL DBG_LOG +#define SFUD_DEBUG(fmt, ...) LOG_D("(%s:%ld) "fmt"", __FILE__, __LINE__, ##__VA_ARGS__) +#else +#define DBG_LVL DBG_INFO +#endif /* RT_DEBUG_SFUD */ + +#define DBG_TAG "SFUD" +#include +extern void rt_kprintf(const char *fmt, ...); +#define SFUD_INFO(...) LOG_I(__VA_ARGS__) + /** * Using probe flash JEDEC SFDP parameter. */