Re: [libgpiod] gpiod_line_get_value_bulk may be broken?

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

 



On Sat, 29 Jul 2023 at 03:03, Kent Gibson <warthog618@xxxxxxxxx> wrote:

> > Unfortunately I won't know what chip the line is on, but I have
> > already considered that and plan to have an array of structs
> > containing the "bulk" and the "chip" for each chip that is needed
> > according to the IO line list submitted by the (pesky!) users.
> >
>
> So the IO lines are specified by name?

Yes, they are.

Before I go too far down the wrong path, it has occurred to me that I
probably can't allow the lines to go out of scope?

ie, this (pseudocode) won't work

for each lineName in lineList
    temp_line = gpiod_chip_find_line(chip, lineName)
    gpiod_line_bulk_add(&bulk, temp_line);
next

As each line in the bulk will actually point to the same (last found) line?
Or am I missing a subtlety?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912




[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