Skip to content

Commit

Permalink
Add note about DTR behavior on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic authored and sirhcel committed Jan 22, 2025
1 parent a71198e commit ec256f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ impl SerialPortBuilder {
}

/// Set data terminal ready (DTR) to the given state when opening the device
///
/// Note: On Linux, DTR is automatically set on open. Even if you set `dtr_on_open` to false,
/// DTR will be asserted for a short moment when opening the port. This can't be prevented
/// without kernel modifications.
#[must_use]
pub fn dtr_on_open(mut self, state: bool) -> Self {
self.dtr_on_open = Some(state);
Expand Down

0 comments on commit ec256f0

Please sign in to comment.