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