pub struct RfIrq2 { /* private fields */ }Expand description
RF IRQ 2 pin
Implementations§
Source§impl RfIrq2
impl RfIrq2
Sourcepub fn new(pin: B8, cs: &CriticalSection) -> Self
pub fn new(pin: B8, cs: &CriticalSection) -> Self
Create a new RF IRQ 2 pin from pin B8.
§Example
use stm32wlxx_hal::{
gpio::{PortB, RfIrq2},
pac,
};
let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
let gpiob: PortB = PortB::split(dp.GPIOB, &mut dp.RCC);
let b8: RfIrq2 = cortex_m::interrupt::free(|cs| RfIrq2::new(gpiob.b8, cs));Sourcepub fn free(self) -> B8
pub fn free(self) -> B8
Free the GPIO pin.
§Example
use stm32wlxx_hal::{
gpio::{pins, PortB, RfIrq2},
pac,
};
let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
let gpiob: PortB = PortB::split(dp.GPIOB, &mut dp.RCC);
let b8: RfIrq2 = cortex_m::interrupt::free(|cs| RfIrq2::new(gpiob.b8, cs));
let b8: pins::B8 = b8.free();Trait Implementations§
Auto Trait Implementations§
impl Freeze for RfIrq2
impl RefUnwindSafe for RfIrq2
impl Send for RfIrq2
impl Sync for RfIrq2
impl Unpin for RfIrq2
impl UnwindSafe for RfIrq2
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