samd21,samd51,nrf52840: unify bootloader entry process

This commit is contained in:
sago35
2022-07-05 22:28:13 +09:00
committed by Ron Evans
parent ff7c71c99c
commit fcefcb191c
9 changed files with 60 additions and 69 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ func cdcSetup(setup usbSetup) bool {
if setup.bRequest == usb_CDC_SET_LINE_CODING || setup.bRequest == usb_CDC_SET_CONTROL_LINE_STATE {
// auto-reset into the bootloader
if usbLineInfo.dwDTERate == 1200 && usbLineInfo.lineState&usb_CDC_LINESTATE_DTR == 0 {
ResetProcessor()
EnterBootloader()
} else {
// TODO: cancel any reset
}