correct disconnection check to only dtr

This commit is contained in:
hathach 2018-09-04 18:36:08 +07:00
parent 3ae24d9f9a
commit 0d92c65829

View File

@ -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);