Struct stm32wlxx_hal::gpio::RfIrq0
source · pub struct RfIrq0 { /* private fields */ }
Expand description
RF IRQ 0 pin
Implementations§
source§impl RfIrq0
impl RfIrq0
sourcepub fn new(pin: B3, cs: &CriticalSection) -> Self
pub fn new(pin: B3, cs: &CriticalSection) -> Self
Create a new RF IRQ 0 pin from pin B3.
Example
use stm32wlxx_hal::{
gpio::{PortB, RfIrq0},
pac,
};
let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
let gpiob: PortB = PortB::split(dp.GPIOB, &mut dp.RCC);
let b3: RfIrq0 = cortex_m::interrupt::free(|cs| RfIrq0::new(gpiob.b3, cs));
sourcepub fn free(self) -> B3
pub fn free(self) -> B3
Free the GPIO pin.
Example
use stm32wlxx_hal::{
gpio::{pins, PortB, RfIrq0},
pac,
};
let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
let gpiob: PortB = PortB::split(dp.GPIOB, &mut dp.RCC);
let b3: RfIrq0 = cortex_m::interrupt::free(|cs| RfIrq0::new(gpiob.b3, cs));
let b3: pins::B3 = b3.free();
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for RfIrq0
impl Send for RfIrq0
impl Sync for RfIrq0
impl Unpin for RfIrq0
impl UnwindSafe for RfIrq0
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more