mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-02-23 23:57:43 +11:00
Fix gpio docs
The sio argument does not work with a bare pac SIO struct
This commit is contained in:
parent
90a6f8414d
commit
6edfc60960
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,8 @@
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use rp2040_hal::prelude::*;
|
//! use rp2040_hal::prelude::*;
|
||||||
//! let mut pac = rp2040_pac::Peripherals::take().unwrap();
|
//! let mut pac = rp2040_pac::Peripherals::take().unwrap();
|
||||||
//! let pins = pac.IO_BANK0.split(pac.PADS_BANK0, pac.SIO, &mut pac.RESETS);
|
//! let sio = Sio::new(pac.SIO);
|
||||||
|
//! let pins = pac.IO_BANK0.split(pac.PADS_BANK0, sio.gpio_bank0, &mut pac.RESETS);
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Once you have the GPIO pins struct, you can take individual pins and configure them:
|
//! Once you have the GPIO pins struct, you can take individual pins and configure them:
|
||||||
|
|
Loading…
Add table
Reference in a new issue