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