summaryrefslogtreecommitdiff
path: root/src/class/net/net_device.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-09-01 12:02:25 +0700
committerhathach <[email protected]>2020-09-01 12:02:25 +0700
commitbe708bb8a444a6e8f8676be842fcfd02a583ed0b (patch)
treea72cd5e5491ade67c40b0a5f152d9d697420caaf /src/class/net/net_device.h
parentd108ea4326d824da73da0a4f9632c5da6aa2e3ec (diff)
parentf10b8145afb6d7b78fbf31b525951b4137e1d774 (diff)
Merge branch 'master' into update-host
Diffstat (limited to 'src/class/net/net_device.h')
-rw-r--r--src/class/net/net_device.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/class/net/net_device.h b/src/class/net/net_device.h
index 67cd99933..0175ea56b 100644
--- a/src/class/net/net_device.h
+++ b/src/class/net/net_device.h
@@ -37,7 +37,7 @@
#include "netif/ethernet.h"
/* declared here, NOT in usb_descriptors.c, so that the driver can intelligently ZLP as needed */
-#define CFG_TUD_NET_ENDPOINT_SIZE ((CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 512 : 64)
+#define CFG_TUD_NET_ENDPOINT_SIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
/* Maximum Tranmission Unit (in bytes) of the network, including Ethernet header */
#define CFG_TUD_NET_MTU (1500 + SIZEOF_ETH_HDR)
@@ -72,13 +72,13 @@ void tud_network_xmit(struct pbuf *p);
//--------------------------------------------------------------------+
// INTERNAL USBD-CLASS DRIVER API
//--------------------------------------------------------------------+
-void netd_init (void);
-void netd_reset (uint8_t rhport);
-bool netd_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t *p_length);
-bool netd_control_request (uint8_t rhport, tusb_control_request_t const * request);
-bool netd_control_complete (uint8_t rhport, tusb_control_request_t const * request);
-bool netd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
-void netd_report (uint8_t *buf, uint16_t len);
+void netd_init (void);
+void netd_reset (uint8_t rhport);
+uint16_t netd_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len);
+bool netd_control_request (uint8_t rhport, tusb_control_request_t const * request);
+bool netd_control_complete (uint8_t rhport, tusb_control_request_t const * request);
+bool netd_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes);
+void netd_report (uint8_t *buf, uint16_t len);
#ifdef __cplusplus
}