Fork of https://developer.mbed.org/users/bscott/code/STM32_USBDevice/

Fork of STM32_USBDevice by Bradley Scott

Revision:
69:4fabf74d68fc
Parent:
47:a0cd9646ecd1
Child:
71:c201afb71300
--- a/USBSerial/USBSerial.cpp	Tue Nov 22 11:16:27 2016 +0000
+++ b/USBSerial/USBSerial.cpp	Tue Dec 13 13:32:10 2016 +0000
@@ -35,6 +35,9 @@
 
 
 bool USBSerial::writeBlock(uint8_t * buf, uint16_t size) {
+    if(!terminal_connected) {
+        return false;
+    }
     if(size > MAX_PACKET_SIZE_EPBULK) {
         return false;
     }