mirror of
https://github.com/candle-usb/candleLight_fw.git
synced 2025-02-04 06:12:55 +08:00
usbd_gs_can: USBD_GS_CAN_GetCfgDesc(): add comment why the USBD_GS_CAN_CfgDesc is copied to RAM
This commit is contained in:
parent
fe0eef5e8f
commit
65c6eefc8b
@ -646,8 +646,13 @@ static uint8_t USBD_GS_CAN_SOF(struct _USBD_HandleTypeDef *pdev)
|
|||||||
|
|
||||||
static uint8_t *USBD_GS_CAN_GetCfgDesc(uint16_t *len)
|
static uint8_t *USBD_GS_CAN_GetCfgDesc(uint16_t *len)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* The USB stack writes to the returned buffer, so it cannot live
|
||||||
|
* in ROM.
|
||||||
|
*/
|
||||||
*len = sizeof(USBD_GS_CAN_CfgDesc);
|
*len = sizeof(USBD_GS_CAN_CfgDesc);
|
||||||
memcpy(USBD_DescBuf, USBD_GS_CAN_CfgDesc, sizeof(USBD_GS_CAN_CfgDesc));
|
memcpy(USBD_DescBuf, USBD_GS_CAN_CfgDesc, sizeof(USBD_GS_CAN_CfgDesc));
|
||||||
|
|
||||||
return USBD_DescBuf;
|
return USBD_DescBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user