Skip to content

Commit 3852552

Browse files
authored
Update usb_serial.cpp
1 parent 0be991b commit 3852552

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

STM32F1/cores/maple/usb_serial.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ uint8 USBSerial::pending(void) {
178178
return usb_cdcacm_get_pending();
179179
}
180180

181-
uint8 USBSerial::isConnected(void) {
182-
return usb_is_connected(USBLIB) && usb_is_configured(USBLIB) && usb_cdcacm_get_dtr();
183-
}
184-
185181
uint8 USBSerial::getDTR(void) {
186182
return usb_cdcacm_get_dtr();
187183
}
@@ -190,6 +186,10 @@ uint8 USBSerial::getRTS(void) {
190186
return usb_cdcacm_get_rts();
191187
}
192188

189+
uint8 USBSerial::operator bool() {
190+
return usb_is_connected(USBLIB) && usb_is_configured(USBLIB) && usb_cdcacm_get_dtr();
191+
}
192+
193193
#if BOARD_HAVE_SERIALUSB
194194
#ifdef SERIAL_USB
195195
USBSerial Serial;

0 commit comments

Comments
 (0)