pub struct AnyPin<'lt> { /* private fields */ }
Expand description
Any GPIO pin.
Implementations§
Source§impl<'lt> AnyPin<'lt>
impl<'lt> AnyPin<'lt>
Sourcepub unsafe fn split(self) -> (InputSignal<'lt>, OutputSignal<'lt>)
Available on crate feature unstable
only.
pub unsafe fn split(self) -> (InputSignal<'lt>, OutputSignal<'lt>)
unstable
only.Split the pin into an input and output signal.
Peripheral signals allow connecting peripherals together without using external hardware.
Creating an input signal enables the pin’s input buffer.
§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.
§Panics
This function panics if the pin is not an output pin.
let pin1 = peripherals.GPIO1.degrade();
let (input, output) = unsafe { pin1.split() };
§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.
Sourcepub unsafe fn into_input_signal(self) -> InputSignal<'lt>
Available on crate feature unstable
only.
pub unsafe fn into_input_signal(self) -> InputSignal<'lt>
unstable
only.Convert the pin into an input signal.
Peripheral signals allow connecting peripherals together without using external hardware.
Creating an input signal enables the pin’s input buffer.
§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.
§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.
Sourcepub fn into_output_signal(self) -> OutputSignal<'lt>
Available on crate feature unstable
only.
pub fn into_output_signal(self) -> OutputSignal<'lt>
unstable
only.Convert the pin into an output signal.
Peripheral signals allow connecting peripherals together without using external hardware.
§Panics
This function panics if the pin is not an output pin.
§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.