We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 618ffd0 commit 1f13f47Copy full SHA for 1f13f47
1 file changed
STM32F1/cores/maple/usb_serial.cpp
@@ -106,7 +106,7 @@ size_t n = 0;
106
107
size_t USBSerial::write(const void *buf, uint32 len) {
108
size_t n = 0;
109
- if (!this->isConnected() || !usb_cdcacm_get_dtr() || !buf) {
+ if (!this->isConnected() || !buf) {
110
return 0;
111
}
112
@@ -199,7 +199,7 @@ uint8 USBSerial::pending(void) {
199
200
201
uint8 USBSerial::isConnected(void) {
202
- return usb_is_connected(USBLIB) && usb_is_configured(USBLIB);
+ return usb_is_connected(USBLIB) && usb_is_configured(USBLIB) && usb_cdcacm_get_dtr();
203
204
205
uint8 USBSerial::getDTR(void) {
0 commit comments