Struct stm32wlxx_hal::gpio::SgSckDbg
source · 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 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