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