mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
fix cast-align warning for nuc505
This commit is contained in:
parent
a7db945cff
commit
550746097b
@ -7,9 +7,6 @@ CFLAGS += \
|
||||
-mfpu=fpv4-sp-d16 \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_NUC505
|
||||
|
||||
# TODO this cast-align is caused by dcd_nuc505 should be fixed
|
||||
CFLAGS += -Wno-error=cast-align
|
||||
|
||||
# All source paths should be relative to the top level.
|
||||
LD_FILE = hw/bsp/$(BOARD)/nuc505_flashtoram.ld
|
||||
|
||||
|
@ -182,7 +182,10 @@ static void dcd_userEP_in_xfer(struct xfer_ctl_t *xfer, USBD_EP_T *ep)
|
||||
/* provided buffers are thankfully 32-bit aligned, allowing most data to be transfered as 32-bit */
|
||||
while (countdown > 3)
|
||||
{
|
||||
ep->EPDAT = *(uint32_t *)xfer->data_ptr;
|
||||
uint32_t u32;
|
||||
memcpy(&u32, xfer->data_ptr, 4);
|
||||
|
||||
ep->EPDAT = u32;
|
||||
xfer->data_ptr += 4; countdown -= 4;
|
||||
}
|
||||
while (countdown--)
|
||||
|
Loading…
x
Reference in New Issue
Block a user