summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-04-23 14:50:27 +0700
committerGitHub <[email protected]>2020-04-23 14:50:27 +0700
commitf8bb4c86ef0fab6f4540aa9f418c2df54c2f99ee (patch)
tree559760af8e17e1fc80154aa0a454df3041215f09 /src
parentc39dc03331683167be3c2a6ca59a4ee8e6e6620d (diff)
parenta029c63b3061c1b84c18d9a7453bdf7180e02b86 (diff)
Merge pull request #376 from hathach/add-more-example
Add dynamic configuration example
Diffstat (limited to 'src')
-rw-r--r--src/common/tusb_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index ef232a593..2d80f8210 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -223,12 +223,16 @@ void tu_print_mem(void const *buf, uint16_t count, uint8_t indent);
#define TU_LOG1 tu_printf
#define TU_LOG1_MEM tu_print_mem
#define TU_LOG1_LOCATION() tu_printf("%s: %d:\r\n", __PRETTY_FUNCTION__, __LINE__)
+#define TU_LOG1_INT(x) tu_printf(#x " = %ld\n", (uint32_t) (x) )
+#define TU_LOG1_HEX(x) tu_printf(#x " = %lX\n", (uint32_t) (x) )
// Log with debug level 2
#if CFG_TUSB_DEBUG > 1
#define TU_LOG2 TU_LOG1
#define TU_LOG2_MEM TU_LOG1_MEM
#define TU_LOG2_LOCATION() TU_LOG1_LOCATION()
+ #define TU_LOG2_INT TU_LOG1_INT
+ #define TU_LOG2_HEX TU_LOG1_HEX
#endif