We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e01018b commit 8ebc4beCopy full SHA for 8ebc4be
cores/arduino/USB/samd21_device.c
@@ -143,13 +143,11 @@ void UDD_Init(void)
143
/* Set the configuration */
144
udd_force_device_mode();
145
udd_device_run_in_standby();
146
- // Set address of USB SRAM
+ // Set address of USB SRAM
147
USB->DEVICE.DESCADD.reg = (uint32_t)(&usb_endpoint_table[0]);
148
// For USB_SPEED_FULL
149
udd_force_full_speed();
150
- for (i = 0; i < sizeof(usb_endpoint_table); i++) {
151
- (*(uint32_t *)(&usb_endpoint_table[0]+i)) = 0;
152
- }
+ memset(&usb_endpoint_table[0], 0, sizeof(usb_endpoint_table));
153
154
// Configure interrupts
155
NVIC_SetPriority((IRQn_Type) USB_IRQn, 0UL);
0 commit comments