migration: Fix example to use correct method .with_pull(...) (#3145)

This commit is contained in:
Priit Laes 2025-02-18 14:05:43 +02:00 committed by GitHub
parent acbb98339c
commit 1a40e3419b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -244,7 +244,7 @@ GPIO drivers now take configuration structs.
```diff
- Input::new(peripherals.GPIO0, Pull::Up);
+ Input::new(peripherals.GPIO0, InputConfig::default().with_pull_direction(Pull::Up));
+ Input::new(peripherals.GPIO0, InputConfig::default().with_pull(Pull::Up));
- Output::new(peripherals.GPIO0, Level::Low);
+ Output::new(peripherals.GPIO0, Level::Low, OutputConfig::default());