diff options
| author | hathach <thach@tinyusb.org> | 2018-09-04 18:36:08 +0700 |
|---|---|---|
| committer | hathach <thach@tinyusb.org> | 2018-09-04 18:36:08 +0700 |
| commit | 0d92c65829cc18ef40d221785c5a7c9f7fde0e8c (patch) | |
| tree | d76419b610ebf1a76e33f637cc017b15e14fd97d | |
| parent | 3ae24d9f9a36cfba6aeb616abe5aa576ce27d69a (diff) | |
correct disconnection check to only dtr
| -rw-r--r-- | ports/nrf/usb/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/nrf/usb/usb.c b/ports/nrf/usb/usb.c index f8b5fd663..248d31e21 100644 --- a/ports/nrf/usb/usb.c +++ b/ports/nrf/usb/usb.c @@ -130,8 +130,8 @@ uint32_t tusb_hal_millis(void) { void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) { (void) itf; // interface ID, not used - // disconnected event - if ( !dtr && !rts ) + // DTR = false is counted as disconnected + if ( !dtr ) { cdc_line_coding_t coding; tud_cdc_get_line_coding(&coding); |
