diff options
| -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) |
