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