summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-05-17 17:04:53 +0800
committersakumisu <[email protected]>2024-05-17 17:04:53 +0800
commit13e4670f3dd14765cb9ea0cb8401ea57fa5b9f7a (patch)
tree5589103411cdd95b3395da48edf318dd1c84b6be
parent1d9a36b61c1bc5d4b5b7086e6e61e99b8d1beb66 (diff)
update: remove internal configs, you should get config from usb_config.h
-rw-r--r--class/cdc/usbh_cdc_ncm.c8
-rw-r--r--class/vendor/net/usbh_rtl8152.c7
-rw-r--r--class/wireless/usbh_rndis.c8
-rw-r--r--core/usbd_core.c4
4 files changed, 0 insertions, 27 deletions
diff --git a/class/cdc/usbh_cdc_ncm.c b/class/cdc/usbh_cdc_ncm.c
index f8cc03f3..f6e43af3 100644
--- a/class/cdc/usbh_cdc_ncm.c
+++ b/class/cdc/usbh_cdc_ncm.c
@@ -23,14 +23,6 @@
#define CONFIG_USBHOST_CDC_NCM_ETH_MAX_SEGSZE 1514U
-/* eth rx size must be a multiple of 512 or 64 */
-#ifndef CONFIG_USBHOST_CDC_NCM_ETH_MAX_RX_SIZE
-#define CONFIG_USBHOST_CDC_NCM_ETH_MAX_RX_SIZE (2048)
-#endif
-#ifndef CONFIG_USBHOST_CDC_NCM_ETH_MAX_TX_SIZE
-#define CONFIG_USBHOST_CDC_NCM_ETH_MAX_TX_SIZE (2048)
-#endif
-
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_cdc_ncm_rx_buffer[CONFIG_USBHOST_CDC_NCM_ETH_MAX_RX_SIZE];
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_cdc_ncm_tx_buffer[CONFIG_USBHOST_CDC_NCM_ETH_MAX_TX_SIZE];
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_cdc_ncm_inttx_buffer[16];
diff --git a/class/vendor/net/usbh_rtl8152.c b/class/vendor/net/usbh_rtl8152.c
index 3711c751..8def54fb 100644
--- a/class/vendor/net/usbh_rtl8152.c
+++ b/class/vendor/net/usbh_rtl8152.c
@@ -12,13 +12,6 @@
#define DEV_FORMAT "/dev/rtl8152"
-#ifndef CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE
-#define CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE (16*1024)
-#endif
-#ifndef CONFIG_USBHOST_RTL8152_ETH_MAX_TX_SIZE
-#define CONFIG_USBHOST_RTL8152_ETH_MAX_TX_SIZE (2048)
-#endif
-
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rtl8152_rx_buffer[CONFIG_USBHOST_RTL8152_ETH_MAX_RX_SIZE];
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rtl8152_tx_buffer[CONFIG_USBHOST_RTL8152_ETH_MAX_TX_SIZE];
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rtl8152_inttx_buffer[2];
diff --git a/class/wireless/usbh_rndis.c b/class/wireless/usbh_rndis.c
index b1ca36cf..ab99855d 100644
--- a/class/wireless/usbh_rndis.c
+++ b/class/wireless/usbh_rndis.c
@@ -18,14 +18,6 @@ USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_buf[4096];
#define CONFIG_USBHOST_RNDIS_ETH_MAX_FRAME_SIZE 1514
#define CONFIG_USBHOST_RNDIS_ETH_MSG_SIZE (CONFIG_USBHOST_RNDIS_ETH_MAX_FRAME_SIZE + 44)
-/* eth rx size must be a multiple of 512 or 64 */
-#ifndef CONFIG_USBHOST_RNDIS_ETH_MAX_RX_SIZE
-#define CONFIG_USBHOST_RNDIS_ETH_MAX_RX_SIZE (2048)
-#endif
-#ifndef CONFIG_USBHOST_RNDIS_ETH_MAX_TX_SIZE
-#define CONFIG_USBHOST_RNDIS_ETH_MAX_TX_SIZE (2048)
-#endif
-
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_rx_buffer[CONFIG_USBHOST_RNDIS_ETH_MAX_RX_SIZE];
static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_tx_buffer[CONFIG_USBHOST_RNDIS_ETH_MAX_TX_SIZE];
// static USB_NOCACHE_RAM_SECTION USB_MEM_ALIGNX uint8_t g_rndis_inttx_buffer[16];
diff --git a/core/usbd_core.c b/core/usbd_core.c
index 042b72e0..05152fa0 100644
--- a/core/usbd_core.c
+++ b/core/usbd_core.c
@@ -18,10 +18,6 @@
#define INTF_DESC_bInterfaceNumber 2 /** Interface number offset */
#define INTF_DESC_bAlternateSetting 3 /** Alternate setting offset */
-#ifndef CONFIG_USBDEV_STRING_LANGID
-#define CONFIG_USBDEV_STRING_LANGID 0x0409
-#endif
-
struct usbd_tx_rx_msg {
uint8_t ep;
uint8_t ep_mult;