feat: use fast memcpy for net

This commit is contained in:
sakumisu
2024-05-31 22:28:56 +08:00
parent 5f28438eec
commit 2d63b52d0b
10 changed files with 100 additions and 11 deletions

View File

@@ -721,7 +721,7 @@ int usbh_asix_eth_output(uint8_t *buf, uint32_t buflen)
}
buffer = &g_asix_tx_buffer[4];
memcpy(buffer, buf, buflen);
usb_memcpy(buffer, buf, buflen);
g_asix_tx_buffer[0] = buflen & 0xff;
g_asix_tx_buffer[1] = (buflen >> 8) & 0xff;

View File

@@ -2212,7 +2212,7 @@ int usbh_rtl8152_eth_output(uint8_t *buf, uint32_t buflen)
tx_desc->opts2 = 0;
buffer = g_rtl8152_tx_buffer + sizeof(struct tx_desc);
memcpy(buffer, buf, buflen);
usb_memcpy(buffer, buf, buflen);
USB_LOG_DBG("txlen:%d\r\n", buflen + sizeof(struct tx_desc));