File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ void __irq_usb_lp_can_rx0(void) {
210210
211211#if (USB_ISR_MSK & USB_ISTR_WKUP )
212212 if (istr & USB_ISTR_WKUP & USBLIB -> irq_mask ) {
213- USB_BASE -> ISTR = ~USB_ISTR_WKUP ;
213+ USB_BASE -> ISTR = ~( USB_ISTR_WKUP | USB_ISTR_SUSP ) ;
214214 usb_resume (RESUME_EXTERNAL );
215215 }
216216#endif
@@ -225,7 +225,7 @@ void __irq_usb_lp_can_rx0(void) {
225225 usb_resume (RESUME_LATER );
226226 }
227227 /* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
228- USB_BASE -> ISTR = ~USB_ISTR_SUSP ;
228+ USB_BASE -> ISTR = ~( USB_ISTR_WKUP | USB_ISTR_SUSP ) ;
229229 }
230230#endif
231231
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ uint8 USBSerial::pending(void) {
204204}
205205
206206uint8 USBSerial::isConnected (void ) {
207- return usb_is_connected (USBLIB) && usb_is_configured (USBLIB);
207+ return usb_is_connected (USBLIB) && usb_is_configured (USBLIB) && usb_cdcacm_get_dtr () ;
208208}
209209
210210uint8 USBSerial::getDTR (void ) {
You can’t perform that action at this time.
0 commit comments