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