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