Struct Pin

Source
pub struct Pin<F>
where F: PinIO,
{ /* private fields */ }

Implementations§

Source§

impl Pin<Input>

Source

pub fn is_low(&self) -> bool

Source

pub fn is_high(&self) -> bool

Source

pub fn get_state(&self) -> bool

Source

pub fn is_enabled(&self) -> bool

Source

pub fn set_state(&self, en: bool)

Source

pub fn into_output(self) -> Pin<Output>

Source

pub fn into_pwm(self) -> Option<PwmPin<Input>>

Source§

impl Pin<Output>

Source

pub fn get(_p: &Board, i: PinID) -> Pin<Output>

Source

pub fn low(&self)

Source

pub fn high(&self)

Source

pub fn toggle(&self)

Source

pub fn set_on(&self, en: bool)

Source

pub fn get_state(&self) -> bool

Source

pub fn is_enabled(&self) -> bool

Source

pub fn is_set_low(&self) -> bool

Source

pub fn is_set_high(&self) -> bool

Source

pub fn set_state(&self, en: bool)

Source

pub fn into_input(self) -> Pin<Input>

Source

pub fn into_pwm(self) -> PwmPin<Output>

Source

pub fn output_high(self) -> Pin<Output>

Source

pub fn output(self, high: bool) -> Pin<Output>

Source§

impl<F> Pin<F>
where F: PinIO,

Source

pub fn id(&self) -> &PinID

Source

pub fn get_schmitt(&self) -> bool

Source

pub fn get_slew(&self) -> PinSlew

Source

pub fn set_slew(&self, s: PinSlew)

Source

pub fn pull_type(&self) -> PinPull

Source

pub fn set_schmitt(&self, en: bool)

Source

pub fn is_sync_bypass(&self) -> bool

Source

pub fn is_pwm_avaliable(&self) -> bool

Source

pub fn pull(self, p: PinPull) -> Pin<F>

Source

pub fn set_pull_type(&self, p: PinPull)

Source

pub fn set_drive(&self, s: PinStrength)

Source

pub fn get_strength(&self) -> PinStrength

Source

pub fn set_function(&self, f: PinFunction)

Source

pub fn interrupt_clear(&self, i: PinInterrupt)

Source

pub fn interrupt_set(&self, i: PinInterrupt, en: bool)

Source

pub fn interrupt_status(&self, i: PinInterrupt) -> bool

Source

pub fn interrupt_enabled(&self, i: PinInterrupt) -> bool

Source

pub fn dormant_wake_set(&self, i: PinInterrupt, en: bool)

Source

pub fn dormant_wake_status(&self, i: PinInterrupt) -> bool

Source

pub fn dormant_wake_enabled(&self, i: PinInterrupt) -> bool

Source

pub unsafe fn set_sync_bypass(&self, en: bool)

Trait Implementations§

Source§

impl<F> Acknowledge for Pin<F>
where F: PinIO,

Source§

fn ack_interrupt(&mut self) -> bool

Source§

impl<F> Clone for Pin<F>
where F: PinIO,

Source§

fn clone(&self) -> Pin<F>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl From<Pin<Output>> for Led

Source§

fn from(v: Pin<Output>) -> Led

Converts to this type from the input type.
Source§

impl From<Pin<Output>> for Pin<Input>

Source§

fn from(v: Pin<Output>) -> Pin<Input>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F> Freeze for Pin<F>

§

impl<F> !RefUnwindSafe for Pin<F>

§

impl<F> Send for Pin<F>
where F: Send,

§

impl<F> !Sync for Pin<F>

§

impl<F> Unpin for Pin<F>
where F: Unpin,

§

impl<F> UnwindSafe for Pin<F>
where F: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.