Re: [libgpiod][PATCH 8/8] bindings: rust: examples: replace tools examples with use case examples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri Jun 23, 2023 at 6:39 AM CEST, Kent Gibson wrote:
> Replace tool examples with use case examples drawn from the tools,
> gpio_events example with buffered_event_lifetimes, and
> gpio_threaded_info_events with reconfigure_input_to_output.
>
> Signed-off-by: Kent Gibson <warthog618@xxxxxxxxx>

Reviewed-by: Erik Schilling <erik.schilling@xxxxxxxxxx>

>     let mut buffer = libgpiod::request::Buffer::new(4)?;

Slightly tangential:

Maybe the API should provide some sensible defaults for the buffer size?
(Or just set a sane default and provide ways to override it)? The change
from 1 -> 4 for bulk operations seems reasonable, but I feel like a user
just getting started with all of this likely won't know what might be
good values to pick...

- Erik




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux