diff options
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/usb_serial.cpp | 12 | ||||
-rw-r--r-- | wirish/usb_serial.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/wirish/usb_serial.cpp b/wirish/usb_serial.cpp index 08cda55..c066112 100644 --- a/wirish/usb_serial.cpp +++ b/wirish/usb_serial.cpp @@ -103,5 +103,17 @@ uint8 USBSerial::pending(void) { return usbGetPending(); } +uint8 USBSerial::getDTR(void) { + return usbGetDTR(); +} + +uint8 USBSerial::getRTS(void) { + return usbGetRTS(); +} + +uint8 USBSerial::isConnected(void) { + return (usbIsConnected() && usbIsConfigured()); +} + USBSerial SerialUSB; diff --git a/wirish/usb_serial.h b/wirish/usb_serial.h index abb362b..7c87c04 100644 --- a/wirish/usb_serial.h +++ b/wirish/usb_serial.h @@ -50,6 +50,7 @@ class USBSerial : public Print { uint8 getRTS(); uint8 getDTR(); + uint8 isConnected(); uint8 pending(); }; |