Merge branch 'geekylou-master'

This commit is contained in:
Roger Clark 2016-03-01 16:25:59 +11:00
commit e69af74e96
2 changed files with 3 additions and 3 deletions

View File

@ -210,7 +210,7 @@ void __irq_usb_lp_can_rx0(void) {
#if (USB_ISR_MSK & USB_ISTR_WKUP)
if (istr & USB_ISTR_WKUP & USBLIB->irq_mask) {
USB_BASE->ISTR = ~USB_ISTR_WKUP;
USB_BASE->ISTR = ~(USB_ISTR_WKUP | USB_ISTR_SUSP);
usb_resume(RESUME_EXTERNAL);
}
#endif
@ -225,7 +225,7 @@ void __irq_usb_lp_can_rx0(void) {
usb_resume(RESUME_LATER);
}
/* clear of the ISTR bit must be done after setting of CNTR_FSUSP */
USB_BASE->ISTR = ~USB_ISTR_SUSP;
USB_BASE->ISTR = ~(USB_ISTR_WKUP | USB_ISTR_SUSP);
}
#endif

View File

@ -204,7 +204,7 @@ uint8 USBSerial::pending(void) {
}
uint8 USBSerial::isConnected(void) {
return usb_is_connected(USBLIB) && usb_is_configured(USBLIB);
return usb_is_connected(USBLIB) && usb_is_configured(USBLIB) && usb_cdcacm_get_dtr();
}
uint8 USBSerial::getDTR(void) {