Skip to content

Commit

Permalink
ADD: force port state notification on line coding change, this helps …
Browse files Browse the repository at this point in the history
…some apps to pick up control lines states
  • Loading branch information
r2axz committed Nov 30, 2020
1 parent 31732af commit abbe834
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions usb_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ static usb_status_t usb_cdc_set_line_coding(int port, const usb_cdc_line_coding_
} else {
return usb_status_fail;
}
if (!dry_run) {
/* force sending port state, this helps some apps */
usb_cdc_states[port].serial_state_prev = ~(usb_cdc_states[port].serial_state_prev & 0);
}
return usb_status_ack;
}

Expand Down

0 comments on commit abbe834

Please sign in to comment.