update(port): remove CONFIG_USBDEV_EP_NUM & CONFIG_USBHOST_PIPE_NUM for some ips because they are constant

Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
sakumisu
2025-07-21 21:19:41 +08:00
parent 96ab19e398
commit ddda03c4cb
8 changed files with 18 additions and 14 deletions

View File

@@ -19,7 +19,7 @@
#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_QH_NUM 10
#endif
#ifndef CONFIG_USB_EHCI_QTD_NUM
#define CONFIG_USB_EHCI_QTD_NUM (CONFIG_USB_EHCI_QH_NUM * 3)

View File

@@ -20,9 +20,8 @@
#define CONFIG_USB_FSDEV_RAM_SIZE 512
#endif
#ifndef CONFIG_USBDEV_EP_NUM
#undef CONFIG_USBDEV_EP_NUM
#define CONFIG_USBDEV_EP_NUM 8
#endif
#define USB ((USB_TypeDef *)g_usbdev_bus[0].reg_base)

View File

@@ -8,9 +8,7 @@
#include "hpm_usb_device.h"
#include "usb_glue_hpm.h"
#ifndef USB_NUM_BIDIR_ENDPOINTS
#define USB_NUM_BIDIR_ENDPOINTS CONFIG_USBDEV_EP_NUM
#endif
#define USB_NUM_BIDIR_ENDPOINTS USB_SOC_DCD_MAX_ENDPOINT_COUNT
/* USBSTS, USBINTR */
enum {

View File

@@ -6,6 +6,9 @@
#include "usbd_core.h"
#include "usb_kinetis_reg.h"
#undef CONFIG_USBDEV_EP_NUM
#define CONFIG_USBDEV_EP_NUM 16
#define USB_OTG_DEV ((KINETIS_TypeDef *)g_usbdev_bus[busid].reg_base)
/* Endpoint state */

View File

@@ -17,7 +17,7 @@
#define OHCI_ADDR2TD(x) ((struct ohci_td_hw *)(uintptr_t)((uint32_t)(x) & ~0x0F))
#ifndef CONFIG_USB_OHCI_ED_NUM
#define CONFIG_USB_OHCI_ED_NUM CONFIG_USBHOST_PIPE_NUM
#define CONFIG_USB_OHCI_ED_NUM 10
#endif
#ifndef CONFIG_USB_OHCI_TD_NUM
#define CONFIG_USB_OHCI_TD_NUM 3

View File

@@ -12,13 +12,12 @@
#include "pico/fix/rp2040_usb_device_enumeration.h"
#endif
#undef CONFIG_USBDEV_EP_NUM
#define CONFIG_USBDEV_EP_NUM USB_NUM_ENDPOINTS
#define usb_hw_set hw_set_alias(usb_hw)
#define usb_hw_clear hw_clear_alias(usb_hw)
#ifndef CONFIG_USBDEV_EP_NUM
#define CONFIG_USBDEV_EP_NUM 16
#endif
#ifndef FORCE_VBUS_DETECT
#define FORCE_VBUS_DETECT 1
#endif

View File

@@ -9,6 +9,9 @@
#include "hardware/irq.h"
#include "hardware/structs/usb.h"
#undef CONFIG_USBHOST_PIPE_NUM
#define CONFIG_USBHOST_PIPE_NUM USB_HOST_INTERRUPT_ENDPOINTS
#define usb_hw_set hw_set_alias(usb_hw)
#define usb_hw_clear hw_clear_alias(usb_hw)