pub struct AdiDigitalIn { /* private fields */ }Expand description
Generic digital input ADI device. Generic digital input ADI device.
Implementations§
Source§impl AdiDigitalIn
impl AdiDigitalIn
Sourcepub fn new(port: AdiPort) -> Result<AdiDigitalIn, AdiError>
pub fn new(port: AdiPort) -> Result<AdiDigitalIn, AdiError>
Create a digital input from an ADI port.
Sourcepub fn level(&self) -> Result<LogicLevel, AdiError>
pub fn level(&self) -> Result<LogicLevel, AdiError>
Gets the current logic level of a digital input pin.
Trait Implementations§
Source§impl AdiDevice for AdiDigitalIn
impl AdiDevice for AdiDigitalIn
Source§type PortIndexOutput = u8
type PortIndexOutput = u8
The type that port_index should return. This is usually
u8, but occasionally (u8, u8).Source§fn port_index(&self) -> <AdiDigitalIn as AdiDevice>::PortIndexOutput
fn port_index(&self) -> <AdiDigitalIn as AdiDevice>::PortIndexOutput
Source§fn expander_port_index(&self) -> Option<u8>
fn expander_port_index(&self) -> Option<u8>
Source§fn device_type(&self) -> AdiDeviceType
fn device_type(&self) -> AdiDeviceType
Get the variant of
AdiDeviceType that this device is associated with.Source§impl Debug for AdiDigitalIn
impl Debug for AdiDigitalIn
Source§impl PartialEq for AdiDigitalIn
impl PartialEq for AdiDigitalIn
impl Eq for AdiDigitalIn
impl StructuralPartialEq for AdiDigitalIn
Auto Trait Implementations§
impl Freeze for AdiDigitalIn
impl RefUnwindSafe for AdiDigitalIn
impl Send for AdiDigitalIn
impl Sync for AdiDigitalIn
impl Unpin for AdiDigitalIn
impl UnsafeUnpin for AdiDigitalIn
impl UnwindSafe for AdiDigitalIn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more