summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorarmink <[email protected]>2020-06-13 11:36:12 +0800
committerarmink <[email protected]>2020-06-13 11:36:12 +0800
commit930de79000dca5b13357a0bc668f1e1d1d63bc9a (patch)
treee4012e3c5b12e4167329a18dab3c31b0787bffbc /components/drivers
parent179d0ee4397ee1a776610f587c3186401d9b64fe (diff)
[SFUD] Update the log format to rtdbg.
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/spi/sfud/inc/sfud_cfg.h12
1 files changed, 12 insertions, 0 deletions
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 <rtdbg.h>
+extern void rt_kprintf(const char *fmt, ...);
+#define SFUD_INFO(...) LOG_I(__VA_ARGS__)
+
/**
* Using probe flash JEDEC SFDP parameter.
*/