add ehci hccr offset macro

This commit is contained in:
sakumisu
2024-01-09 20:59:04 +08:00
parent 1158fc3d8c
commit eff338f8a7
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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)