Skip to content

Commit 0d92c65

Browse files
committed
correct disconnection check to only dtr
1 parent 3ae24d9 commit 0d92c65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/nrf/usb/usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ uint32_t tusb_hal_millis(void) {
130130
void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) {
131131
(void) itf; // interface ID, not used
132132

133-
// disconnected event
134-
if ( !dtr && !rts )
133+
// DTR = false is counted as disconnected
134+
if ( !dtr )
135135
{
136136
cdc_line_coding_t coding;
137137
tud_cdc_get_line_coding(&coding);

0 commit comments

Comments
 (0)