[][src]Struct wpilib::dio::DigitalInput

pub struct DigitalInput { /* fields omitted */ }

Class to read a digital input.

This class will read digital inputs and return the current value on the channel. Other devices such as encoders, gear tooth sensors, etc. that are implemented elsewhere will automatically allocate digital inputs and outputs as required. This class is only for devices like switches etc. that aren't implemented anywhere else.

Methods

impl DigitalInput
[src]

pub fn new(channel: i32) -> HalResult<Self>
[src]

pub fn get(&self) -> HalResult<bool>
[src]

Get the value from the digital input channel from the FPGA.

pub fn handle(&self) -> HAL_DigitalHandle
[src]

pub fn channel(&self) -> i32
[src]

Trait Implementations

impl Drop for DigitalInput
[src]

impl Debug for DigitalInput
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]