Device-Chip-Adapter-Gpiod

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    argument indicates the GPIO chip to use. It is passed to
    "gpiod_chip_open_lookup()", which takes either a device node name, full
    path, or chip number. For example, it is possible to use either
    "gpiochip2", "/dev/gpiochip2", or 2 to open the same device.

PROTOCOLS
    Only the "GPIO" protocol is supported:

      my $protocol = $adapter->make_protocol('GPIO');

BUGS AND LIMITATIONS
    The "meta_gpios" method is not yet supported.

    The "tris_gpios" method is not yet supported.

    Libgpiod supports passing a "consumer" string when GPIO lines are opened
    that can identify the application using them. This is currently always
    set to "Device::Chip".

AUTHOR
    Stephen Cavilia <sac@atomicradi.us>

lib/Device/Chip/Adapter/Gpiod.pm  view on Meta::CPAN

    my @lines_values;
    for my $line(sort {$a<=>$b} map{/line(\d+)/ && $1} keys %$lines)
    {
        push @lines_values, $line, $lines->{"line$line"};
    }
    gpiod_write_lines($self->{gpiod_chip}, @lines_values);

    Future->done;
}

=head1 BUGS AND LIMITATIONS

The C<meta_gpios> method is not yet supported.

The C<tris_gpios> method is not yet supported.

Libgpiod supports passing a C<consumer> string when GPIO lines are
opened that can identify the application using them. This is currently
always set to C<"Device::Chip">.

=head1 AUTHOR



( run in 0.552 second using v1.01-cache-2.11-cpan-4d50c553e7e )