[−][src]Struct arduino_mkrzero::gpio::Pin
Represents a GPIO pin with a corresponding PinId
and PinMode
Implementations
impl<I, M> Pin<I, M> where
M: PinMode,
I: PinId,
[src]
M: PinMode,
I: PinId,
pub fn into_floating_input(self, port: &mut Port) -> Pin<I, Input<Floating>>
[src]
Configures the pin to operate as a floating input
pub fn into_pull_down_input(self, port: &mut Port) -> Pin<I, Input<PullDown>>
[src]
Configures the pin to operate as a pulled down input pin
pub fn into_pull_up_input(self, port: &mut Port) -> Pin<I, Input<PullUp>>
[src]
Configures the pin to operate as a pulled up input pin
pub fn into_open_drain_output(self, port: &mut Port) -> Pin<I, Output<PushPull>>
[src]
Configures the pin to operate as an open drain output
pub fn into_readable_open_drain_output(
self,
port: &mut Port
) -> Pin<I, Output<Readable>>
[src]
self,
port: &mut Port
) -> Pin<I, Output<Readable>>
Configures the pin to operate as an open drain output which can be read
pub fn into_push_pull_output(self, port: &mut Port) -> Pin<I, Output<PushPull>>
[src]
Configures the pin to operate as a push-pull output
pub fn into_function_a(self, port: &mut Port) -> Pin<I, Alternate<A>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_b(self, port: &mut Port) -> Pin<I, Alternate<B>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_c(self, port: &mut Port) -> Pin<I, Alternate<C>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_d(self, port: &mut Port) -> Pin<I, Alternate<D>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_e(self, port: &mut Port) -> Pin<I, Alternate<E>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_f(self, port: &mut Port) -> Pin<I, Alternate<F>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_g(self, port: &mut Port) -> Pin<I, Alternate<G>>
[src]
Configures the pin to operate with a peripheral
pub fn into_function_h(self, port: &mut Port) -> Pin<I, Alternate<H>>
[src]
Configures the pin to operate with a peripheral
impl<I> Pin<I, Output<PushPull>> where
I: PinId,
[src]
I: PinId,
pub fn internal_pull_up(&mut self, port: &mut Port, on: bool)
[src]
Control state of the internal pull up
This function shouldn't exist. It is not possible to enable a pull-up resistor in an output mode.
impl<I, M> Pin<I, Output<M>> where
M: OutputConfig,
I: PinId,
[src]
M: OutputConfig,
I: PinId,
pub fn toggle(&mut self)
[src]
Toggle the logic level of the pin; if it is currently high, set it low and vice versa.
Trait Implementations
impl<MODE> EicPin<ExtInt0<Pin<PA00, Alternate<A>>>> for Pin<PA00, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt0<Pin<PA16, Alternate<A>>>> for Pin<PA16, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt1<Pin<PA01, Alternate<A>>>> for Pin<PA01, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt1<Pin<PA17, Alternate<A>>>> for Pin<PA17, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt10<Pin<PA10, Alternate<A>>>> for Pin<PA10, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt10<Pin<PA30, Alternate<A>>>> for Pin<PA30, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt10<Pin<PB10, Alternate<A>>>> for Pin<PB10, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt11<Pin<PA11, Alternate<A>>>> for Pin<PA11, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt11<Pin<PA31, Alternate<A>>>> for Pin<PA31, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt11<Pin<PB11, Alternate<A>>>> for Pin<PB11, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt12<Pin<PA12, Alternate<A>>>> for Pin<PA12, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt12<Pin<PA24, Alternate<A>>>> for Pin<PA24, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt13<Pin<PA13, Alternate<A>>>> for Pin<PA13, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt13<Pin<PA25, Alternate<A>>>> for Pin<PA25, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt14<Pin<PA14, Alternate<A>>>> for Pin<PA14, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt15<Pin<PA15, Alternate<A>>>> for Pin<PA15, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt15<Pin<PA27, Alternate<A>>>> for Pin<PA27, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt2<Pin<PA02, Alternate<A>>>> for Pin<PA02, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt2<Pin<PA18, Alternate<A>>>> for Pin<PA18, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt2<Pin<PB02, Alternate<A>>>> for Pin<PB02, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt3<Pin<PA03, Alternate<A>>>> for Pin<PA03, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt3<Pin<PA19, Alternate<A>>>> for Pin<PA19, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt3<Pin<PB03, Alternate<A>>>> for Pin<PB03, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt4<Pin<PA04, Alternate<A>>>> for Pin<PA04, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt4<Pin<PA20, Alternate<A>>>> for Pin<PA20, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt5<Pin<PA05, Alternate<A>>>> for Pin<PA05, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt5<Pin<PA21, Alternate<A>>>> for Pin<PA21, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt6<Pin<PA06, Alternate<A>>>> for Pin<PA06, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt6<Pin<PA22, Alternate<A>>>> for Pin<PA22, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt6<Pin<PB22, Alternate<A>>>> for Pin<PB22, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt7<Pin<PA07, Alternate<A>>>> for Pin<PA07, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt7<Pin<PA23, Alternate<A>>>> for Pin<PA23, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt7<Pin<PB23, Alternate<A>>>> for Pin<PB23, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt8<Pin<PA28, Alternate<A>>>> for Pin<PA28, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt8<Pin<PB08, Alternate<A>>>> for Pin<PB08, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt9<Pin<PA09, Alternate<A>>>> for Pin<PA09, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<MODE> EicPin<ExtInt9<Pin<PB09, Alternate<A>>>> for Pin<PB09, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA18, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA16, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB10, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA09, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA25, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA31, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB23, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA20, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA01, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA21, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB03, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA23, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA05, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA30, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA17, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA14, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA27, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA11, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA06, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA19, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA00, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA02, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA04, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA28, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA03, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA07, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA13, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA15, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA22, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB09, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB22, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB08, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB11, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA10, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA12, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PA24, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<'_, MODE> ExternalInterrupt for &'_ Pin<PB02, MODE> where
MODE: PinMode,
[src]
MODE: PinMode,
impl<I, M> From<Pin<I, M>> for Pin<I, M> where
M: PinMode,
I: PinId,
[src]
M: PinMode,
I: PinId,
Convert from a v2::Pin
to a v1::Pin
impl<I, M> From<Pin<I, M>> for Pin<I, M> where
M: PinMode,
I: PinId,
[src]
M: PinMode,
I: PinId,
Convert from a v1::Pin
to a v2::Pin
impl<I, M, C> IntoFunction<Pin<I, Alternate<C>>> for Pin<I, M> where
C: AlternateConfig,
M: PinMode,
I: PinId,
[src]
C: AlternateConfig,
M: PinMode,
I: PinId,
pub fn into_function(self, port: &mut Port) -> Pin<I, Alternate<C>>
[src]
impl<S, P, I> Map<S, P> for Pin<I, <I as Map<S, P>>::Mode> where
P: PadNum,
I: PinId + Map<S, P>,
S: Sercom,
[src]
P: PadNum,
I: PinId + Map<S, P>,
S: Sercom,
type Id = I
The PinId
for the corresponding pin
type Mode = <I as Map<S, P>>::Mode
The PinMode
for the corresponding pin
impl<I, M> OutputPin for Pin<I, Output<M>> where
M: OutputConfig,
I: PinId,
[src]
M: OutputConfig,
I: PinId,
type Error = ()
Error type
pub fn set_high(
&mut self
) -> Result<(), <Pin<I, Output<M>> as OutputPin>::Error>
[src]
&mut self
) -> Result<(), <Pin<I, Output<M>> as OutputPin>::Error>
pub fn set_low(&mut self) -> Result<(), <Pin<I, Output<M>> as OutputPin>::Error>
[src]
impl<S, P, I, M> PadPin<Pad<S, P, Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode>>> for Pin<I, M> where
P: PadNum,
M: PinMode,
I: PinId + Map<S, P>,
S: Sercom,
Pin<I, M>: IntoFunction<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode>>,
Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode>: Map<S, P>,
<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode> as Map<S, P>>::Id == <I as Map<S, P>>::Id,
<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode> as Map<S, P>>::Mode == <I as Map<S, P>>::Mode,
[src]
P: PadNum,
M: PinMode,
I: PinId + Map<S, P>,
S: Sercom,
Pin<I, M>: IntoFunction<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode>>,
Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode>: Map<S, P>,
<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode> as Map<S, P>>::Id == <I as Map<S, P>>::Id,
<Pin<<I as Map<S, P>>::Id, <I as Map<S, P>>::Mode> as Map<S, P>>::Mode == <I as Map<S, P>>::Mode,
Auto Trait Implementations
impl<I, M> Send for Pin<I, M> where
I: Send,
M: Send,
[src]
I: Send,
M: Send,
impl<I, M> Sync for Pin<I, M> where
I: Sync,
M: Sync,
[src]
I: Sync,
M: Sync,
impl<I, M> Unpin for Pin<I, M> where
I: Unpin,
M: Unpin,
[src]
I: Unpin,
M: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,