Struct GPIO0
#[non_exhaustive]pub struct GPIO0<'a> { /* private fields */ }Expand description
GPIO0 peripheral singleton
Implementations§
§impl<'d> GPIO0<'d>
impl<'d> GPIO0<'d>
pub unsafe fn split(self) -> (InputSignal<'d>, OutputSignal<'d>)
Available on crate features unstable only.
pub unsafe fn split(self) -> (InputSignal<'d>, OutputSignal<'d>)
unstable only.Split the pin into an input and output signal.
Peripheral signals allow connecting peripherals together without using external hardware.
§Safety
The caller must ensure that peripheral drivers don’t configure the same
GPIO at the same time in multiple places. This includes clones of the
InputSignal struct, as well as the OutputSignal struct.
let (rx, tx) = unsafe { peripherals.GPIO2.split() };
// rx and tx can then be passed to different peripherals to connect them.§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
§impl GPIO0<'_>
impl GPIO0<'_>
pub unsafe fn steal() -> GPIO0<'_>
pub unsafe fn steal() -> GPIO0<'_>
Unsafely create an instance of this peripheral out of thin air.
§Safety
You must ensure that you’re only using one instance of this type at a time.
pub unsafe fn clone_unchecked(&self) -> GPIO0<'_>
pub unsafe fn clone_unchecked(&self) -> GPIO0<'_>
Unsafely clone this peripheral reference.
§Safety
You must ensure that you’re only using one instance of this type at a time.
Trait Implementations§
§impl AdcChannel for GPIO0<'_>
impl AdcChannel for GPIO0<'_>
§fn adc_channel(&self) -> u8
fn adc_channel(&self) -> u8
impl AnalogPin for GPIO0<'_>
unstable only.§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.