pub fn new(mut pin: P, pull: Pull, cs: &CriticalSection) -> Self {
        pin.set_pull(cs, pull);
        pin.set_output_type(cs, OutputType::PushPull);
        pin.set_mode(cs, sealed::Mode::Input);
        Input { pin }
    }
/// Create a new input pin from a GPIO.
///
/// # Example
///
/// Configure GPIO C6 as an input.
/// This is the GPIO for button 3 on the NUCLEO-WL55JC2.
///
/// ```no_run
/// use stm32wlxx_hal::{
///     gpio::{pins, Input, PortC, Pull},
///     pac,
/// };
///
/// let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
///
/// let gpioc: PortC = PortC::split(dp.GPIOC, &mut dp.RCC);
/// let mut c6: Input<pins::C6> =
///     cortex_m::interrupt::free(|cs| Input::new(gpioc.c6, Pull::Up, cs));
/// ```
Create a new input pin from a GPIO.
Create a new input pin from a GPIO .
pub fn new(mut pin: P, pull: Pull, cs: &CriticalSection) -> Self {
        pin.set_pull(cs, pull);
        pin.set_output_type(cs, OutputType::PushPull);
        pin.set_mode(cs, sealed::Mode::Input);
        Input { pin }
    }
pub fn new ( mut pin : P , pull : Pull , cs : & CriticalSection ) -> Self { pin . set_pull ( cs , pull ) ; pin . set_output_type ( cs , OutputType :: PushPull ) ; pin . set_mode ( cs , sealed :: Mode :: Input ) ; Input { pin } }
Create a new input pin from a GPIO.
Create a new input pin from a GPIO .
pin
P
pull
Pull
cs
&CriticalSection
example
Configure GPIO C6 as an input.
This is the GPIO for button 3 on the NUCLEO-WL55JC2.

```no_run
use stm32wlxx_hal::{
gpio::{pins, Input, PortC, Pull},
pac,
}.

let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap().

let gpioc: PortC = PortC::split(dp.GPIOC, &mut dp.RCC);
let mut c6: Input
cortex_m::interrupt::free(|cs| Input::new(gpioc.c6, Pull::Up, cs));
```
Configure GPIO C6 as an input . This is the GPIO for button 3 on the NUCLEO - WL55JC2 . ` ` ` no_run use stm32wlxx_hal :: { gpio :: { pins Input PortC Pull } pac } . let mut dp : pac :: Peripherals = pac :: Peripherals :: take () . unwrap () . let gpioc : PortC = PortC :: split ( dp . GPIOC &mut dp . RCC ) ; let mut c6 : Input cortex_m :: interrupt :: free ( |cs| Input :: new ( gpioc . c6 Pull :: Up cs )) ; ` ` `