Struct gpiochip::GpioChip [−][src]
Provide high-level access to Linux gpiochip Driver
Fields
name: String
name for the chip
label: String
label for the chip
lines: u32
amount of gpios provided by the chip
Methods
impl GpioChip
[src]
impl GpioChip
pub fn new<P: AsRef<Path>>(path: P) -> Result<GpioChip>
[src]
pub fn new<P: AsRef<Path>>(path: P) -> Result<GpioChip>
Open the gpiochip with the provided path
Typically, the path will be something like "/dev/gpiochip0"
.
pub fn info(&self, gpio: u32) -> Result<LineInfo>
[src]
pub fn info(&self, gpio: u32) -> Result<LineInfo>
Acquire information about a gpio
pub fn request(
&self,
consumer: &str,
flags: RequestFlags,
gpio: u32,
default: u8
) -> Result<GpioHandle>
[src]
pub fn request(
&self,
consumer: &str,
flags: RequestFlags,
gpio: u32,
default: u8
) -> Result<GpioHandle>
Request a GpioHandle
for a single gpio
pub fn request_array(
&self,
consumer: &str,
flags: RequestFlags,
gpios: &[u32],
default_values: &[u8]
) -> Result<GpioArrayHandle>
[src]
pub fn request_array(
&self,
consumer: &str,
flags: RequestFlags,
gpios: &[u32],
default_values: &[u8]
) -> Result<GpioArrayHandle>
Request a GpioArrayHandle
for multiple gpios, that should be get/set simultaneously
pub fn request_event(
&self,
consumer: &str,
gpio: u32,
handleflags: RequestFlags,
eventflags: EventRequestFlags
) -> Result<GpioEventHandle>
[src]
pub fn request_event(
&self,
consumer: &str,
gpio: u32,
handleflags: RequestFlags,
eventflags: EventRequestFlags
) -> Result<GpioEventHandle>
Request a GpioEventHandle
for a single gpio
Trait Implementations
impl FromRawFd for GpioChip
[src]
impl FromRawFd for GpioChip
unsafe fn from_raw_fd(fd: RawFd) -> GpioChip
[src]
unsafe fn from_raw_fd(fd: RawFd) -> GpioChip
Constructs a new instance of Self
from the given raw file descriptor. Read more
impl IntoRawFd for GpioChip
[src]
impl IntoRawFd for GpioChip
fn into_raw_fd(self) -> RawFd
[src]
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more
impl AsRawFd for GpioChip
[src]
impl AsRawFd for GpioChip