summaryrefslogtreecommitdiff
path: root/src/host/hcd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-03-04 17:07:04 +0700
committerhathach <[email protected]>2022-03-04 17:07:04 +0700
commit96165a1950140c585db4b739709d079228c3320a (patch)
treef68cf892855aaaa615d4b7481b1c3de973518569 /src/host/hcd.h
parenteb6b5d1219562e417d879c6d13e0a19eef169ad7 (diff)
rename HCD_MAX_XFER to CFG_TUH_ENDPOINT_MAX
minor clean up
Diffstat (limited to 'src/host/hcd.h')
-rw-r--r--src/host/hcd.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h
index 80500f048..d50fc2d60 100644
--- a/src/host/hcd.h
+++ b/src/host/hcd.h
@@ -35,6 +35,19 @@
extern "C" {
#endif
+//--------------------------------------------------------------------+
+// Configuration
+//--------------------------------------------------------------------+
+
+#ifndef CFG_TUH_ENDPOINT_MAX
+ #define CFG_TUH_ENDPOINT_MAX (CFG_TUH_DEVICE_MAX*(CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3))
+// #ifdef TUP_HCD_ENDPOINT_MAX
+// #define CFG_TUH_ENDPPOINT_MAX TUP_HCD_ENDPOINT_MAX
+// #else
+// #define
+// #endif
+#endif
+
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
@@ -81,17 +94,6 @@ typedef struct
} hcd_event_t;
-#if CFG_TUH_ENABLED
-// Max number of endpoints per device
-enum {
- // TODO better computation
- HCD_MAX_ENDPOINT = CFG_TUH_DEVICE_MAX*(CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3),
- HCD_MAX_XFER = HCD_MAX_ENDPOINT*2,
-};
-
-//#define HCD_MAX_ENDPOINT 16
-//#define HCD_MAX_XFER 16
-
typedef struct {
uint8_t rhport;
uint8_t hub_addr;
@@ -99,8 +101,6 @@ typedef struct {
uint8_t speed;
} hcd_devtree_info_t;
-#endif
-
//--------------------------------------------------------------------+
// Controller API
//--------------------------------------------------------------------+