From b59de9bb3861e32ba3bb6cd52675c99109da2724 Mon Sep 17 00:00:00 2001 From: Juraj Sadel Date: Wed, 8 Jan 2025 11:20:48 +0100 Subject: [PATCH] migration guide --- esp-hal/MIGRATING-0.22.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/esp-hal/MIGRATING-0.22.md b/esp-hal/MIGRATING-0.22.md index 76fa15d7fb1..a2d3a185e55 100644 --- a/esp-hal/MIGRATING-0.22.md +++ b/esp-hal/MIGRATING-0.22.md @@ -396,6 +396,23 @@ e.g. + GlitchOccurred ``` +RX/TX pin assignment moved from constructors to builder functions. + +e.g. + +```diff + let mut uart1 = Uart::new( + peripherals.UART1, +- Config::default(), +- peripherals.GPIO1, +- peripherals.GPIO2, +- ).unwrap(); ++ Config::default()) ++ .unwrap() ++ .with_rx(peripherals.GPIO1) ++ .with_tx(peripherals.GPIO2); +``` + ## Spi `with_miso` has been split Previously, `with_miso` set up the provided pin as an input and output, which was necessary for half duplex.