Skip to content
Snippets Groups Projects
Commit 8ebc4be2 authored by Cristian Maglie's avatar Cristian Maglie
Browse files

Using memset instead of for-loop in UDD_Init

parent e01018b7
No related branches found
No related tags found
No related merge requests found
......@@ -143,13 +143,11 @@ void UDD_Init(void)
/* Set the configuration */
udd_force_device_mode();
udd_device_run_in_standby();
// Set address of USB SRAM
// Set address of USB SRAM
USB->DEVICE.DESCADD.reg = (uint32_t)(&usb_endpoint_table[0]);
// For USB_SPEED_FULL
udd_force_full_speed();
for (i = 0; i < sizeof(usb_endpoint_table); i++) {
(*(uint32_t *)(&usb_endpoint_table[0]+i)) = 0;
}
memset(&usb_endpoint_table[0], 0, sizeof(usb_endpoint_table));
// Configure interrupts
NVIC_SetPriority((IRQn_Type) USB_IRQn, 0UL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment