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 tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) {
(void) itf; // interface ID, not used (void) itf; // interface ID, not used
// disconnected event // DTR = false is counted as disconnected
if ( !dtr && !rts ) if ( !dtr )
{ {
cdc_line_coding_t coding; cdc_line_coding_t coding;
tud_cdc_get_line_coding(&coding); tud_cdc_get_line_coding(&coding);