From 0f41fd9f3fc5449d139a11d13f251dd734eeacb5 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Mon, 26 Aug 2024 21:35:16 +0000 Subject: [PATCH] Enable pull-ups in uart_loopback examples --- rp2040-hal-examples/src/bin/uart_loopback.rs | 4 ++-- rp235x-hal-examples/src/bin/uart_loopback.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rp2040-hal-examples/src/bin/uart_loopback.rs b/rp2040-hal-examples/src/bin/uart_loopback.rs index 73d7f9dcf..fd41b5e1a 100644 --- a/rp2040-hal-examples/src/bin/uart_loopback.rs +++ b/rp2040-hal-examples/src/bin/uart_loopback.rs @@ -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( @@ -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( diff --git a/rp235x-hal-examples/src/bin/uart_loopback.rs b/rp235x-hal-examples/src/bin/uart_loopback.rs index 2e2be1a93..8e4a93050 100644 --- a/rp235x-hal-examples/src/bin/uart_loopback.rs +++ b/rp235x-hal-examples/src/bin/uart_loopback.rs @@ -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( @@ -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(