diff options
| author | sakumisu <[email protected]> | 2024-01-09 20:59:04 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-01-09 20:59:04 +0800 |
| commit | eff338f8a7737d1a16d4bbaf74a6bfd53787f403 (patch) | |
| tree | 5bed9bcee972e59766288a5f72d5731b3137dd1f | |
| parent | 1158fc3d8c1a71ae89cb9dbd7504712114352af2 (diff) | |
add ehci hccr offset macro
| -rw-r--r-- | cherryusb_config_template.h | 1 | ||||
| -rw-r--r-- | port/ehci/usb_ehci_priv.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/cherryusb_config_template.h b/cherryusb_config_template.h index 27733348..38956741 100644 --- a/cherryusb_config_template.h +++ b/cherryusb_config_template.h @@ -142,6 +142,7 @@ /* ================ EHCI Configuration ================ */ +#define CONFIG_USB_EHCI_HCCR_OFFSET (0x0) #define CONFIG_USB_EHCI_HCOR_OFFSET (0x10) #define CONFIG_USB_EHCI_FRAME_LIST_SIZE 1024 // #define CONFIG_USB_EHCI_INFO_ENABLE diff --git a/port/ehci/usb_ehci_priv.h b/port/ehci/usb_ehci_priv.h index c0b17df5..2a67b686 100644 --- a/port/ehci/usb_ehci_priv.h +++ b/port/ehci/usb_ehci_priv.h @@ -5,7 +5,7 @@ #include "usbh_hub.h" #include "usb_hc_ehci.h" -#define EHCI_HCCR ((struct ehci_hccr *)(bus->hcd.reg_base)) +#define EHCI_HCCR ((struct ehci_hccr *)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCCR_OFFSET)) #define EHCI_HCOR ((struct ehci_hcor *)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCOR_OFFSET)) #define EHCI_PTR2ADDR(x) ((uint32_t)(x) & ~0x1F) |
