Skip to content

Commit

Permalink
migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajSadel committed Jan 8, 2025
1 parent cc61919 commit b59de9b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions esp-hal/MIGRATING-0.22.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b59de9b

Please sign in to comment.