|
memcpy(frame, src, len)
展开:
- /* Fast-copy data to frame buffer */
- for ( ; len > 7U; frame += 8, src += 8, len -= 8U) {
- __UNALIGNED_UINT32_WRITE(&frame[0], __UNALIGNED_UINT32_READ(&src[0]));
- __UNALIGNED_UINT32_WRITE(&frame[4], __UNALIGNED_UINT32_READ(&src[4]));
- }
- /* Copy remaining 7 bytes */
- for ( ; len > 1U; frame += 2, src += 2, len -= 2U) {
- __UNALIGNED_UINT16_WRITE(&frame[0], __UNALIGNED_UINT16_READ(&src[0]));
- }
- if (len > 0U) { frame[0] = src[0]; }
复制代码
|
|