Check USB DTR is active before sending data down the USB port (this should only be active when the port is connected to a terminal).
This commit is contained in:
parent
20331cea64
commit
618ffd069d
|
@ -106,7 +106,7 @@ size_t n = 0;
|
|||
|
||||
size_t USBSerial::write(const void *buf, uint32 len) {
|
||||
size_t n = 0;
|
||||
if (!this->isConnected() || !buf) {
|
||||
if (!this->isConnected() || !usb_cdcacm_get_dtr() || !buf) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue