Fix compilation bug in the documentation

This commit is contained in:
Weird Constructor 2022-01-09 15:16:01 +01:00
parent adfe63f0df
commit a7b71bd5aa

View file

@ -1102,9 +1102,15 @@ macro_rules! bsp_pins {
/// ///
/// like this: /// like this:
///```no_run ///```no_run
/// let _spi_sclk = pins.gpio2.into_mode::<gpio::FunctionSpi>(); /// use rp2040_hal::{pac, gpio::{bank0::Gpio12, Pin, Pins, PushPullOutput}, sio::Sio};
/// let _spi_mosi = pins.gpio3.into_mode::<gpio::FunctionSpi>(); ///
/// let _spi_miso = pins.gpio4.into_mode::<gpio::FunctionSpi>(); /// let mut peripherals = pac::Peripherals::take().unwrap();
/// let sio = Sio::new(peripherals.SIO);
/// let pins = Pins::new(peripherals.IO_BANK0,peripherals.PADS_BANK0,sio.gpio_bank0, &mut peripherals.RESETS);
///
/// let _spi_sclk = pins.gpio2.into_mode::<rp2040_hal::gpio::FunctionSpi>();
/// let _spi_mosi = pins.gpio3.into_mode::<rp2040_hal::gpio::FunctionSpi>();
/// let _spi_miso = pins.gpio4.into_mode::<rp2040_hal::gpio::FunctionSpi>();
///``` ///```
/// ///
/// **See also [rp2040_hal::gpio::pin] for more in depth information /// **See also [rp2040_hal::gpio::pin] for more in depth information