Skip to content

Commit

Permalink
Correct UART cts and rts pins
Browse files Browse the repository at this point in the history
  • Loading branch information
1c3t3a committed Dec 7, 2021
1 parent b4f5304 commit 76103d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ impl<'a> Runtime<'a> {
};

let cts_pin = cts
.map(|(_, pin)| Self::get_input_pin_by_nr(pin).ok())
.map(|(_, pin_ptr)| self.memory.get_value(pin_ptr).unwrap_or(0))
.map(|pin| Self::get_input_pin_by_nr(pin).ok())
.unwrap_or_default();

let rts_pin = rts
.map(|(_, pin)| Self::get_output_pin_by_nr(pin).ok())
.map(|(_, pin_ptr)| self.memory.get_value(pin_ptr).unwrap_or(0))
.map(|pin| Self::get_output_pin_by_nr(pin).ok())
.unwrap_or_default();

let pins = Pins {
Expand Down

0 comments on commit 76103d5

Please sign in to comment.