summaryrefslogtreecommitdiff
path: root/src/tusb_option.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-06-10 14:53:03 +0700
committerhathach <[email protected]>2022-06-10 14:53:03 +0700
commit040ef0640df837a49e7f46c12fa7b00fe6a77bf6 (patch)
tree289e310e8bbe568efcc578ce162764f7db63bf3d /src/tusb_option.h
parent96fecedabe2218244a1a0d8f2629d00a23bfa632 (diff)
more dynamic controller for host
Diffstat (limited to 'src/tusb_option.h')
-rw-r--r--src/tusb_option.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h
index e332c5728..206d23e72 100644
--- a/src/tusb_option.h
+++ b/src/tusb_option.h
@@ -28,7 +28,7 @@
#define _TUSB_OPTION_H_
// To avoid GCC compiler warnings when -pedantic option is used (strict ISO C)
-typedef int make_iso_compilers_happy ;
+typedef int make_iso_compilers_happy;
#include "common/tusb_compiler.h"
@@ -217,6 +217,9 @@ typedef int make_iso_compilers_happy ;
#define CFG_TUD_MAX_SPEED (TUD_RHPORT_MODE & OPT_MODE_SPEED_MASK)
#endif
+// For backward compatible
+#define TUSB_OPT_DEVICE_ENABLED CFG_TUD_ENABLED
+
// highspeed support indicator
#define TUD_OPT_HIGH_SPEED (CFG_TUD_MAX_SPEED ? CFG_TUD_MAX_SPEED : TUP_RHPORT_HIGHSPEED)
@@ -230,7 +233,6 @@ typedef int make_iso_compilers_happy ;
#define TUH_OPT_RHPORT 1
#else
#define TUH_RHPORT_MODE OPT_MODE_NONE
- #define TUH_OPT_RHPORT -1
#endif
#ifndef CFG_TUH_ENABLED
@@ -244,7 +246,6 @@ typedef int make_iso_compilers_happy ;
#endif
// For backward compatible
-#define TUSB_OPT_DEVICE_ENABLED CFG_TUD_ENABLED
#define TUSB_OPT_HOST_ENABLED CFG_TUH_ENABLED
//--------------------------------------------------------------------+