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