Skip to content

Commit

Permalink
update: change memcpy to fast memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisu committed Nov 24, 2024
1 parent c6bdace commit a72ecd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions class/video/usbd_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,9 @@ bool usbd_video_stream_split_transfer(uint8_t busid, uint8_t ep)

uint32_t len2 = MIN(len, g_usbd_video[busid].probe.dwMaxPayloadTransferSize - g_usbd_video[busid].stream_headerlen);

memcpy(&g_usbd_video[busid].ep_buffer[offset + g_usbd_video[busid].stream_headerlen],
&g_usbd_video[busid].stream_buf[g_usbd_video[busid].stream_offset],
len2);
usb_memcpy(&g_usbd_video[busid].ep_buffer[offset + g_usbd_video[busid].stream_headerlen],
&g_usbd_video[busid].stream_buf[g_usbd_video[busid].stream_offset],
len2);

g_usbd_video[busid].stream_offset += len2;
len -= len2;
Expand Down
2 changes: 1 addition & 1 deletion core/usbd_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ void usbd_event_ep0_setup_complete_handler(uint8_t busid, uint8_t *psetup)
#ifdef CONFIG_USBDEV_EP0_INDATA_NO_COPY
g_usbd_core[busid].ep0_data_buf = buf;
#else
memcpy(g_usbd_core[busid].ep0_data_buf, buf, g_usbd_core[busid].ep0_data_buf_residue);
usb_memcpy(g_usbd_core[busid].ep0_data_buf, buf, g_usbd_core[busid].ep0_data_buf_residue);
#endif
} else {
/* use memcpy(*data, xxx, len); has copied into ep0 buffer, we do nothing */
Expand Down

0 comments on commit a72ecd2

Please sign in to comment.