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