summaryrefslogtreecommitdiff
path: root/src/device/usbd_pvt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd_pvt.h')
-rw-r--r--src/device/usbd_pvt.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h
index 8393d3469..940b2858b 100644
--- a/src/device/usbd_pvt.h
+++ b/src/device/usbd_pvt.h
@@ -33,13 +33,20 @@
extern "C" {
#endif
+// Level where CFG_TUSB_DEBUG must be at least for USBD is logged
+#ifndef CFG_TUD_LOG_LEVEL
+#define CFG_TUD_LOG_LEVEL 2
+#endif
+
+#define TU_LOG_USBD(...) TU_LOG(CFG_TUD_LOG_LEVEL, __VA_ARGS__)
+
//--------------------------------------------------------------------+
// Class Driver API
//--------------------------------------------------------------------+
typedef struct
{
- #if CFG_TUSB_DEBUG >= 2
+ #if CFG_TUSB_DEBUG >= CFG_TUD_LOG_LEVEL
char const* name;
#endif