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 Freeze for RfIrq0
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