summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-02-19 17:55:43 +0700
committerGitHub <[email protected]>2024-02-19 17:55:43 +0700
commit382f686f19afc069f8c20347f87c651d737009b2 (patch)
tree7a91e8a41c74f70068f22a85efb05a816d9048dc /src/common
parentfabc20b3fb77a353ed118c06cf65f9a37e482880 (diff)
parent4d4e20b71efe8d9e1b5a141d84e058ff54801c67 (diff)
Merge pull request #2389 from IngHK/improve_debug_prints
improved hex debug print, improved USBH debug prints, added pid/vid debug print
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_debug.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h
index 0f4dc93f3..2e9f1d9cd 100644
--- a/src/common/tusb_debug.h
+++ b/src/common/tusb_debug.h
@@ -60,6 +60,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent);
static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
+ tu_printf("\r\n");
}
// Log with Level
@@ -76,7 +77,7 @@ static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) {
#define TU_LOG1_MEM tu_print_mem
#define TU_LOG1_BUF(_x, _n) tu_print_buf((uint8_t const*)(_x), _n)
#define TU_LOG1_INT(_x) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) )
-#define TU_LOG1_HEX(_x) tu_printf(#_x " = %lX\r\n", (unsigned long) (_x) )
+#define TU_LOG1_HEX(_x) tu_printf(#_x " = 0x%lX\r\n", (unsigned long) (_x) )
// Log Level 2: Warn
#if CFG_TUSB_DEBUG >= 2