Skip to content

Commit

Permalink
Enable pull-ups in uart_loopback examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jannic committed Aug 26, 2024
1 parent f84b764 commit 0f41fd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rp2040-hal-examples/src/bin/uart_loopback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn main() -> ! {
// UART TX (characters sent from RP2350)
pins.gpio0.into_function(),
// UART RX (characters received by RP2350)
pins.gpio1.into_function(),
pins.gpio1.into_pull_up_input().into_function(),
);
let mut uart0 = hal::uart::UartPeripheral::new(pac.UART0, uart0_pins, &mut pac.RESETS)
.enable(
Expand All @@ -104,7 +104,7 @@ fn main() -> ! {
// UART TX (characters sent from RP2350)
pins.gpio4.into_function(),
// UART RX (characters received by RP2350)
pins.gpio5.into_function(),
pins.gpio5.into_pull_up_input().into_function(),
);
let mut uart1 = hal::uart::UartPeripheral::new(pac.UART1, uart1_pins, &mut pac.RESETS)
.enable(
Expand Down
4 changes: 2 additions & 2 deletions rp235x-hal-examples/src/bin/uart_loopback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn main() -> ! {
// UART TX (characters sent from RP2350)
pins.gpio0.into_function(),
// UART RX (characters received by RP2350)
pins.gpio1.into_function(),
pins.gpio1.into_pull_up_input().into_function(),
);
let mut uart0 = hal::uart::UartPeripheral::new(pac.UART0, uart0_pins, &mut pac.RESETS)
.enable(
Expand All @@ -101,7 +101,7 @@ fn main() -> ! {
// UART TX (characters sent from RP2350)
pins.gpio4.into_function(),
// UART RX (characters received by RP2350)
pins.gpio5.into_function(),
pins.gpio5.into_pull_up_input().into_function(),
);
let mut uart1 = hal::uart::UartPeripheral::new(pac.UART1, uart1_pins, &mut pac.RESETS)
.enable(
Expand Down

0 comments on commit 0f41fd9

Please sign in to comment.