[−][src]Struct linux_embedded_hal::CdevPin
Newtype around gpio_cdev::LineHandle
that implements the embedded-hal
traits
Implementations
impl CdevPin
[src]
pub fn new(handle: LineHandle) -> Result<Self, Error>
[src]
See gpio_cdev::Line::request
for details.
Methods from Deref<Target = LineHandle>
pub fn get_value(&self) -> Result<u8, Error>
[src]
Request the current state of this Line from the kernel
This call is expected to succeed for both input and output lines. It should be noted, however, that some drivers may not be able to give any useful information when the value is requested for an output line.
This value should be 0 or 1 which a "1" representing that the line is active. Usually this means that the line is at logic-level high but it could mean the opposite if the line has been marked as being ACTIVE_LOW.
pub fn set_value(&self, value: u8) -> Result<(), Error>
[src]
Request that the line be driven to the specified value
The value should be 0 or 1 with 1 representing a request to make the line "active". Usually "active" means logic level high unless the line has been marked as ACTIVE_LOW.
Calling set_value
on a line that is not an output will
likely result in an error (from the kernel).
pub fn line(&self) -> &Line
[src]
Get the Line information associated with this handle.
Trait Implementations
impl Deref for CdevPin
[src]
type Target = LineHandle
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target
[src]
impl DerefMut for CdevPin
[src]
impl InputPin for CdevPin
[src]
type Error = Error
Error type
pub fn try_is_high(&self) -> Result<bool, Self::Error>
[src]
pub fn try_is_low(&self) -> Result<bool, Self::Error>
[src]
impl OutputPin for CdevPin
[src]
Auto Trait Implementations
impl RefUnwindSafe for CdevPin
impl Send for CdevPin
impl Sync for CdevPin
impl Unpin for CdevPin
impl UnwindSafe for CdevPin
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,