summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-05-28 15:04:15 +0700
committerGitHub <[email protected]>2020-05-28 15:04:15 +0700
commitb8783e10a9033ccf7485d4a2ff9e8850421989be (patch)
treedacfd186b961ecc29defb052ab7e2efb4edee297 /src/common
parentde88294e051985afc505869edb23a8a56732df7f (diff)
parent53b749fd72e9e4573c80f0bc4083c5cf9e82177c (diff)
Merge pull request #418 from hathach/enhance-usbd-driver-open
Enhance usbd driver open() API
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index f144cda73..4b4183ae6 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -228,6 +228,7 @@ void tu_print_var(uint8_t const* buf, uint32_t bufsize)
for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]);
}
+
// Log with debug level 1
#define TU_LOG1 tu_printf
#define TU_LOG1_MEM tu_print_mem
@@ -235,6 +236,7 @@ void tu_print_var(uint8_t const* buf, uint32_t bufsize)
#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) )
#define TU_LOG1_LOCATION() tu_printf("%s: %d:\r\n", __PRETTY_FUNCTION__, __LINE__)
+#define TU_LOG1_FAILED() tu_printf("%s: %d: Failed\r\n", __PRETTY_FUNCTION__, __LINE__)
// Log with debug level 2
#if CFG_TUSB_DEBUG > 1
@@ -277,6 +279,7 @@ static inline char const* lookup_find(lookup_table_t const* p_table, uint32_t ke
#define TU_LOG1_VAR(...)
#define TU_LOG1_INT(...)
#define TU_LOG1_HEX(...)
+ #define TU_LOG1_FAILED()
#endif
#ifndef TU_LOG2