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