Skip to content

Commit 7ebd62a

Browse files
committed
Fixed wrong adaption to CMSIS 4.5 in bootloader
1 parent 68e3040 commit 7ebd62a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bootloaders/zero/sam_ba_usb.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ void sam_ba_usb_CDC_Enumerate(P_USB_CDC pCdc)
344344
pUsb->DEVICE.DeviceEndpoint[wIndex].EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1;
345345
if (pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.bit.STALL1)
346346
{
347-
pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.bit.STALL1;
347+
pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL1;
348348
// The Stall has occurred, then reset data toggle
349349
pUsb->DEVICE.DeviceEndpoint[wIndex].EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSSET_DTGLIN;
350350
}
@@ -358,7 +358,7 @@ void sam_ba_usb_CDC_Enumerate(P_USB_CDC pCdc)
358358
pUsb->DEVICE.DeviceEndpoint[wIndex].EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0;
359359
if (pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.bit.STALL0)
360360
{
361-
pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.bit.STALL0;
361+
pUsb->DEVICE.DeviceEndpoint[wIndex].EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_STALL0;
362362
// The Stall has occurred, then reset data toggle
363363
pUsb->DEVICE.DeviceEndpoint[wIndex].EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSSET_DTGLOUT;
364364
}

0 commit comments

Comments
 (0)