summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-04-07 13:17:01 +0800
committersakumisu <[email protected]>2024-04-07 13:17:01 +0800
commitc5f2ffa6f9711b5c484fce071cd06dc39311ed86 (patch)
treee4ade3e29f5dfa8a4304c4f2d6bde7998b5a56c4 /port
parentdb10c62b596bba1a641ff4f0c3f204b428a59233 (diff)
export ehci config macros
Diffstat (limited to 'port')
-rw-r--r--port/ehci/usb_ehci_priv.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/port/ehci/usb_ehci_priv.h b/port/ehci/usb_ehci_priv.h
index 771dae3a..03fa270c 100644
--- a/port/ehci/usb_ehci_priv.h
+++ b/port/ehci/usb_ehci_priv.h
@@ -18,9 +18,15 @@
#define EHCI_ADDR2QTD(x) ((struct ehci_qtd_hw *)(uintptr_t)((uint32_t)(x) & ~0x1F))
#define EHCI_ADDR2ITD(x) ((struct ehci_itd_hw *)(uintptr_t)((uint32_t)(x) & ~0x1F))
+#ifndef CONFIG_USB_EHCI_QH_NUM
#define CONFIG_USB_EHCI_QH_NUM CONFIG_USBHOST_PIPE_NUM
-#define CONFIG_USB_EHCI_QTD_NUM 3
-#define CONFIG_USB_EHCI_ITD_NUM 20
+#endif
+#ifndef CONFIG_USB_EHCI_QTD_NUM
+#define CONFIG_USB_EHCI_QTD_NUM 3
+#endif
+#ifndef CONFIG_USB_EHCI_ITD_NUM
+#define CONFIG_USB_EHCI_ITD_NUM 20
+#endif
extern uint8_t usbh_get_port_speed(struct usbh_bus *bus, const uint8_t port);