summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-08-02 16:26:57 +0700
committerGitHub <[email protected]>2023-08-02 16:26:57 +0700
commit5cf94234d20cf74e1d6bb952ce1680b25f2568b3 (patch)
tree30617e2acbcfb690ca5fc845e0a8c714a8b7d42b /src/host
parent2cf869c1a4e9cac81b6dc3b3917aa08b0e39b122 (diff)
parent868d52f3a87d4404b0e93e49781d4190589599b9 (diff)
Merge pull request #2200 from hathach/selective-log
default class driver log level to CFG_TUH/TUD_LOG_LEVEL
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c7
-rw-r--r--src/host/usbh_classdriver.h7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index c8eb91be3..49f8c78f1 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -45,13 +45,6 @@
#define CFG_TUH_INTERFACE_MAX 8
#endif
-// Level where CFG_TUSB_DEBUG must be at least for USBH is logged
-#ifndef CFG_TUH_LOG_LEVEL
- #define CFG_TUH_LOG_LEVEL 2
-#endif
-
-#define TU_LOG_USBH(...) TU_LOG(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
-
//--------------------------------------------------------------------+
// USBH-HCD common data structure
//--------------------------------------------------------------------+
diff --git a/src/host/usbh_classdriver.h b/src/host/usbh_classdriver.h
index be9811641..308b4418a 100644
--- a/src/host/usbh_classdriver.h
+++ b/src/host/usbh_classdriver.h
@@ -35,6 +35,13 @@
extern "C" {
#endif
+// Level where CFG_TUSB_DEBUG must be at least for USBH is logged
+#ifndef CFG_TUH_LOG_LEVEL
+ #define CFG_TUH_LOG_LEVEL 2
+#endif
+
+#define TU_LOG_USBH(...) TU_LOG(CFG_TUH_LOG_LEVEL, __VA_ARGS__)
+
enum {
USBH_EPSIZE_BULK_MAX = (TUH_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS)
};