Fix memset in USBDDriver_Initialize#1104
Conversation
FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/AtmelFiles/usb/device/core/USBDDriver.c
Outdated
Show resolved
Hide resolved
| if (pInterfaces != 0) { | ||
|
|
||
| memset(pInterfaces, sizeof(pInterfaces), 0); | ||
| memset(pInterfaces, 0, sizeof(uint8_t)); |
There was a problem hiding this comment.
What is the purpose of this statement I wonder.
Because this is not setting the whole array to 0, it is just setting the first element to 0. Does that mean that we are using entry with a 0 as a delimiter?
Just trying to understand why is this being done at all :)
There was a problem hiding this comment.
IMHO, "multiple USB driver" is not supported in this version. I believe this is for future use. Confirming with partner but no response yet.
| if (pInterfaces != 0) { | ||
|
|
||
| memset(pInterfaces, sizeof(pInterfaces), 0); | ||
| memset(pInterfaces, 0, sizeof(uint8_t)); |
There was a problem hiding this comment.
Same here. I ask because I am not that familiar with the USB driver code.
|
Since this file is not maintained by us, I'm trying to contact partner to address this. |
|
Close this issue for now because this file is not maintained by us. Thank you. |
…et (FreeRTOS#1104) Otherwise it is very reasonable that config_TIMER_TASK_STACK_DEPTH is undefined.
Fix memset in USBDDriver_Initialize
Description
As #1103 described, the memset usage is incorrect.
Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.