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