pub struct Pin<A: BaseAddress, const P: char, const N: u8, M> { /* private fields */ }Expand description
Individual GPIO pin.
Implementations§
source§impl<A: BaseAddress, const P: char, const N: u8, M: PinMode> Pin<A, P, N, M>
impl<A: BaseAddress, const P: char, const N: u8, M: PinMode> Pin<A, P, N, M>
sourcepub fn into_disabled(self) -> Pin<A, P, N, Disabled>
pub fn into_disabled(self) -> Pin<A, P, N, Disabled>
Disables the pin.
sourcepub fn into_input(self) -> Pin<A, P, N, Input>
pub fn into_input(self) -> Pin<A, P, N, Input>
Configures the pin to operate as an input pin.
sourcepub fn into_output(self) -> Pin<A, P, N, Output>
pub fn into_output(self) -> Pin<A, P, N, Output>
Configures the pin to operate as an output pin.
sourcepub fn into_eint(self) -> Pin<A, P, N, EintMode>
pub fn into_eint(self) -> Pin<A, P, N, EintMode>
Configures the pin to operate as an external interrupt.
sourcepub fn into_function<const F: u8>(self) -> Pin<A, P, N, Function<F>>
pub fn into_function<const F: u8>(self) -> Pin<A, P, N, Function<F>>
Configures the pin to operate as an alternate function.
Trait Implementations§
source§impl<A: BaseAddress, const P: char, const N: u8> EintPin for Pin<A, P, N, EintMode>
impl<A: BaseAddress, const P: char, const N: u8> EintPin for Pin<A, P, N, EintMode>
fn listen(&mut self, event: Event)
fn enable_interrupt(&mut self)
fn disable_interrupt(&mut self)
fn clear_interrupt_pending_bit(&mut self)
fn check_interrupt(&mut self) -> bool
source§impl<A: BaseAddress, const P: char, const N: u8> ErrorType for Pin<A, P, N, Input>
impl<A: BaseAddress, const P: char, const N: u8> ErrorType for Pin<A, P, N, Input>
§type Error = Infallible
type Error = Infallible
Error type
source§impl<A: BaseAddress, const P: char, const N: u8> ErrorType for Pin<A, P, N, Output>
impl<A: BaseAddress, const P: char, const N: u8> ErrorType for Pin<A, P, N, Output>
§type Error = Infallible
type Error = Infallible
Error type