update(platform): remove net class weak api, check CONFIG_USBHOST_PLATFORM_* macro is defined or not in usbh_lwip.c
Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
@@ -306,16 +306,6 @@ int usbh_cdc_ecm_eth_output(uint32_t buflen)
|
|||||||
return usbh_submit_urb(&g_cdc_ecm_class.bulkout_urb);
|
return usbh_submit_urb(&g_cdc_ecm_class.bulkout_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
__WEAK void usbh_cdc_ecm_run(struct usbh_cdc_ecm *cdc_ecm_class)
|
|
||||||
{
|
|
||||||
(void)cdc_ecm_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
__WEAK void usbh_cdc_ecm_stop(struct usbh_cdc_ecm *cdc_ecm_class)
|
|
||||||
{
|
|
||||||
(void)cdc_ecm_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct usbh_class_driver cdc_ecm_class_driver = {
|
const struct usbh_class_driver cdc_ecm_class_driver = {
|
||||||
.driver_name = "cdc_ecm",
|
.driver_name = "cdc_ecm",
|
||||||
.connect = usbh_cdc_ecm_connect,
|
.connect = usbh_cdc_ecm_connect,
|
||||||
|
|||||||
@@ -386,16 +386,6 @@ int usbh_cdc_ncm_eth_output(uint32_t buflen)
|
|||||||
return usbh_submit_urb(&g_cdc_ncm_class.bulkout_urb);
|
return usbh_submit_urb(&g_cdc_ncm_class.bulkout_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
__WEAK void usbh_cdc_ncm_run(struct usbh_cdc_ncm *cdc_ncm_class)
|
|
||||||
{
|
|
||||||
(void)cdc_ncm_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
__WEAK void usbh_cdc_ncm_stop(struct usbh_cdc_ncm *cdc_ncm_class)
|
|
||||||
{
|
|
||||||
(void)cdc_ncm_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct usbh_class_driver cdc_ncm_class_driver = {
|
const struct usbh_class_driver cdc_ncm_class_driver = {
|
||||||
.driver_name = "cdc_ncm",
|
.driver_name = "cdc_ncm",
|
||||||
.connect = usbh_cdc_ncm_connect,
|
.connect = usbh_cdc_ncm_connect,
|
||||||
|
|||||||
10
class/vendor/net/usbh_asix.c
vendored
10
class/vendor/net/usbh_asix.c
vendored
@@ -795,16 +795,6 @@ int usbh_asix_eth_output(uint32_t buflen)
|
|||||||
return usbh_submit_urb(&g_asix_class.bulkout_urb);
|
return usbh_submit_urb(&g_asix_class.bulkout_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
__WEAK void usbh_asix_run(struct usbh_asix *asix_class)
|
|
||||||
{
|
|
||||||
(void)asix_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
__WEAK void usbh_asix_stop(struct usbh_asix *asix_class)
|
|
||||||
{
|
|
||||||
(void)asix_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const uint16_t asix_id_table[][2] = {
|
static const uint16_t asix_id_table[][2] = {
|
||||||
{ 0x0B95, 0x772B },
|
{ 0x0B95, 0x772B },
|
||||||
{ 0x0B95, 0x7720 },
|
{ 0x0B95, 0x7720 },
|
||||||
|
|||||||
10
class/vendor/net/usbh_rtl8152.c
vendored
10
class/vendor/net/usbh_rtl8152.c
vendored
@@ -2251,16 +2251,6 @@ int usbh_rtl8152_eth_output(uint32_t buflen)
|
|||||||
return usbh_submit_urb(&g_rtl8152_class.bulkout_urb);
|
return usbh_submit_urb(&g_rtl8152_class.bulkout_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
__WEAK void usbh_rtl8152_run(struct usbh_rtl8152 *rtl8152_class)
|
|
||||||
{
|
|
||||||
(void)rtl8152_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
__WEAK void usbh_rtl8152_stop(struct usbh_rtl8152 *rtl8152_class)
|
|
||||||
{
|
|
||||||
(void)rtl8152_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const uint16_t rtl_id_table[][2] = {
|
static const uint16_t rtl_id_table[][2] = {
|
||||||
{ 0x0BDA, 0x8152 },
|
{ 0x0BDA, 0x8152 },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
|
|||||||
@@ -578,16 +578,6 @@ int usbh_rndis_eth_output(uint32_t buflen)
|
|||||||
return usbh_submit_urb(&g_rndis_class.bulkout_urb);
|
return usbh_submit_urb(&g_rndis_class.bulkout_urb);
|
||||||
}
|
}
|
||||||
|
|
||||||
__WEAK void usbh_rndis_run(struct usbh_rndis *rndis_class)
|
|
||||||
{
|
|
||||||
(void)rndis_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
__WEAK void usbh_rndis_stop(struct usbh_rndis *rndis_class)
|
|
||||||
{
|
|
||||||
(void)rndis_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct usbh_class_driver rndis_class_driver = {
|
static const struct usbh_class_driver rndis_class_driver = {
|
||||||
.driver_name = "rndis",
|
.driver_name = "rndis",
|
||||||
.connect = usbh_rndis_connect,
|
.connect = usbh_rndis_connect,
|
||||||
|
|||||||
@@ -30,6 +30,14 @@
|
|||||||
#error TCPIP_THREAD_STACKSIZE must be >= 1024
|
#error TCPIP_THREAD_STACKSIZE must be >= 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_USBHOST_PLATFORM_CDC_ECM) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_CDC_RNDIS) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_CDC_NCM) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_ASIX) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_RTL8152)
|
||||||
|
#error "Please enable at least one USB Ethernet platform in usb_config.h or Kconfig"
|
||||||
|
#endif
|
||||||
|
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_ECM
|
// #define CONFIG_USBHOST_PLATFORM_CDC_ECM
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_RNDIS
|
// #define CONFIG_USBHOST_PLATFORM_CDC_RNDIS
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_NCM
|
// #define CONFIG_USBHOST_PLATFORM_CDC_NCM
|
||||||
|
|||||||
@@ -48,6 +48,14 @@
|
|||||||
#error RT_LWIP_TCPTHREAD_STACKSIZE must be >= 2048
|
#error RT_LWIP_TCPTHREAD_STACKSIZE must be >= 2048
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_USBHOST_PLATFORM_CDC_ECM) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_CDC_RNDIS) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_CDC_NCM) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_ASIX) && \
|
||||||
|
!defined(CONFIG_USBHOST_PLATFORM_RTL8152)
|
||||||
|
#error "Please enable at least one USB Ethernet platform in usb_config.h or Kconfig"
|
||||||
|
#endif
|
||||||
|
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_ECM
|
// #define CONFIG_USBHOST_PLATFORM_CDC_ECM
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_RNDIS
|
// #define CONFIG_USBHOST_PLATFORM_CDC_RNDIS
|
||||||
// #define CONFIG_USBHOST_PLATFORM_CDC_NCM
|
// #define CONFIG_USBHOST_PLATFORM_CDC_NCM
|
||||||
|
|||||||
Reference in New Issue
Block a user