Struct linux_embedded_hal::CdevPin[][src]

pub struct CdevPin(pub LineHandle, _);
Expand description

Newtype around gpio_cdev::LineHandle that implements the embedded-hal traits

Tuple Fields

0: LineHandle

Implementations

See gpio_cdev::Line::request for details.

Methods from Deref<Target = LineHandle>

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.

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).

Get the Line information associated with this handle.

Get the flags with which this handle was created

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Error type

Is the input pin high?

Is the input pin low?

Error type

Drives the pin low Read more

Drives the pin high Read more

Drives the pin high or low depending on the provided value Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.