summaryrefslogtreecommitdiff
path: root/src/common/tusb_debug.h
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-01-06 18:42:58 +0100
committerHiFiPhile <[email protected]>2026-01-06 18:42:58 +0100
commit60154a128795bcd6ca36042cac1b8bebf1a2764e (patch)
tree0557ab4b2a01c64de109c54662ba6f3a58147bc9 /src/common/tusb_debug.h
parentc5f91ec6f54509d03529e276ffd42b0d9abab695 (diff)
parent593dce28349cf5b1299c2cf1193312cb783574f3 (diff)
Merge remote-tracking branch 'tinyusb/master' into ep0_direct
Diffstat (limited to 'src/common/tusb_debug.h')
-rw-r--r--src/common/tusb_debug.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h
index e0e09f5ce..ba5b4afd1 100644
--- a/src/common/tusb_debug.h
+++ b/src/common/tusb_debug.h
@@ -117,12 +117,16 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3
}
}
- // not found return the key value in hex
+ #ifndef CFG_TUSB_DEBUG_PRINTF
+ // not found return the key value in hex if no custom printf is defined
static char not_found[11];
- if (snprintf(not_found, sizeof(not_found), "0x%08lX", (unsigned long) key) <= 0) {
+ if (snprintf(not_found, sizeof(not_found), "0x%08lX", (unsigned long)key) <= 0) {
not_found[0] = 0;
}
return not_found;
+ #else
+ return "NotFound";
+ #endif
}
#endif // CFG_TUSB_DEBUG