summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorHubretXie <[email protected]>2018-12-04 09:09:58 +0800
committerGitHub <[email protected]>2018-12-04 09:09:58 +0800
commitfa062996372b6f19bfceaeada5d1d59de2d82507 (patch)
tree8c562c847fb602d6a247fd749cb5cd76d51c093a /components/utilities
parent889afa7b0488a2bc30013619ad457fbc8854fabd (diff)
Update ulog_def.h
增加log_hex
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/ulog/ulog_def.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/utilities/ulog/ulog_def.h b/components/utilities/ulog/ulog_def.h
index 8df3dd2087..e7c033f71c 100644
--- a/components/utilities/ulog/ulog_def.h
+++ b/components/utilities/ulog/ulog_def.h
@@ -94,6 +94,12 @@ extern "C" {
#define ulog_e(TAG, ...)
#endif /* (LOG_LVL >= LOG_LVL_ERROR) && (ULOG_OUTPUT_LVL >= LOG_LVL_ERROR) */
+#if (LOG_LVL >= LOG_LVL_DBG) && (ULOG_OUTPUT_LVL >= LOG_LVL_DBG)
+ #define ulog_hex(TAG, width, buf, size) ulog_hexdump(TAG, width, buf, size)
+#else
+ #define ulog_hex(TAG, width, buf, size)
+#endif /* (LOG_LVL >= LOG_LVL_DBG) && (ULOG_OUTPUT_LVL >= LOG_LVL_DBG) */
+
/* assert for developer. */
#ifdef ULOG_ASSERT_ENABLE
#define ULOG_ASSERT(EXPR) \
@@ -132,6 +138,7 @@ extern "C" {
#define log_d LOG_D
#define log_v LOG_D
#define log_raw LOG_RAW
+#define log_hex LOG_HEX
#define ELOG_LVL_ASSERT LOG_LVL_ASSERT
#define ELOG_LVL_ERROR LOG_LVL_ERROR
#define ELOG_LVL_WARN LOG_LVL_WARNING