usb-standard: fix alignment assumption for Cortex-M0 platforms
This commit is contained in:
parent
d79674db09
commit
f871e539ed
@ -129,8 +129,9 @@ static uint16_t build_config_descriptor(usbd_device *usbd_dev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill in wTotalLength. */
|
/* Fill in wTotalLength.
|
||||||
*(uint16_t *)(tmpbuf + 2) = totallen;
|
* Note that tmpbuf is sometimes not halfword-aligned */
|
||||||
|
memcpy((tmpbuf + 2), &totallen, sizeof(uint16_t));
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user