Struct atsam4_hal::gpio::Pc0

source ·
pub struct Pc0<MODE> { /* private fields */ }

Implementations§

source§

impl<MODE> Pc0<MODE>

source

pub fn downgrade(self) -> PioX<MODE>

Erases the pin number and port from the type

This is useful when you want to collect the pins into an array where you need all the elements to have the same type

source§

impl<MODE> Pc0<MODE>

source

pub fn into_peripheral_function_a(self, _matrix: &MATRIX) -> Pc0<PfA>

source

pub fn into_peripheral_function_b(self, _matrix: &MATRIX) -> Pc0<PfB>

source

pub fn into_peripheral_function_c(self, _matrix: &MATRIX) -> Pc0<PfC>

source

pub fn into_peripheral_function_d(self, _matrix: &MATRIX) -> Pc0<PfD>

source

pub fn into_floating_input(self, _matrix: &MATRIX) -> Pc0<Input<Floating>>

source

pub fn into_pull_down_input(self, _matrix: &MATRIX) -> Pc0<Input<PullDown>>

source

pub fn into_pull_up_input(self, _matrix: &MATRIX) -> Pc0<Input<PullUp>>

source

pub fn into_open_drain_output(self, _matrix: &MATRIX) -> Pc0<Output<OpenDrain>>

Configures the pin to operate as an open drain output

source

pub fn into_push_pull_output(self, _matrix: &MATRIX) -> Pc0<Output<PushPull>>

Configures the pin to operate as a push-pull output

source§

impl<MODE> Pc0<MODE>

source

pub fn into_extra_function(self, _matrix: &MATRIX) -> Pc0<ExFn>

Trait Implementations§

source§

impl<MODE> InputPin for Pc0<Input<MODE>>

§

type Error = Infallible

Error type
source§

fn is_high(&self) -> Result<bool, Self::Error>

Is the input pin high?
source§

fn is_low(&self) -> Result<bool, Self::Error>

Is the input pin low?
source§

impl IoPin<Pc0<Input<Floating>>, Pc0<Output<PushPull>>> for Pc0<Input<Floating>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin( self, state: PinState ) -> Result<Pc0<Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl IoPin<Pc0<Input<Floating>>, Pc0<Output<PushPull>>> for Pc0<Output<PushPull>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Pc0<Input<Floating>>, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl IoPin<Pc0<Input<PullDown>>, Pc0<Output<PushPull>>> for Pc0<Input<PullDown>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin( self, state: PinState ) -> Result<Pc0<Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl IoPin<Pc0<Input<PullDown>>, Pc0<Output<PushPull>>> for Pc0<Output<PushPull>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Pc0<Input<PullDown>>, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl IoPin<Pc0<Input<PullUp>>, Pc0<Output<PushPull>>> for Pc0<Input<PullUp>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin( self, state: PinState ) -> Result<Pc0<Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl IoPin<Pc0<Input<PullUp>>, Pc0<Output<PushPull>>> for Pc0<Output<PushPull>>

§

type Error = Infallible

Error type.
source§

fn into_input_pin(self) -> Result<Pc0<Input<PullUp>>, Self::Error>

Tries to convert this pin to input mode. Read more
source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
source§

impl<MODE> OutputPin for Pc0<Output<MODE>>

§

type Error = Infallible

Error type
source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high Read more
source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low Read more
source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value Read more
source§

impl<MODE> StatefulOutputPin for Pc0<Output<MODE>>

source§

fn is_set_high(&self) -> Result<bool, Self::Error>

Is the pin in drive high mode? Read more
source§

fn is_set_low(&self) -> Result<bool, Self::Error>

Is the pin in drive low mode? Read more
source§

impl<MODE> Default for Pc0<Output<MODE>>

Software toggle (uses StatefulOutputPin and OutputPin)

Auto Trait Implementations§

§

impl<MODE> RefUnwindSafe for Pc0<MODE>where MODE: RefUnwindSafe,

§

impl<MODE> Send for Pc0<MODE>where MODE: Send,

§

impl<MODE> Sync for Pc0<MODE>where MODE: Sync,

§

impl<MODE> Unpin for Pc0<MODE>where MODE: Unpin,

§

impl<MODE> UnwindSafe for Pc0<MODE>where MODE: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<P> ToggleableOutputPin for Pwhere P: Default,

source§

fn toggle(&mut self) -> Result<(), <P as ToggleableOutputPin>::Error>

Toggle pin output

§

type Error = <P as OutputPin>::Error

Error type
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.