Re: [libgpiod] Add Lua 5.1 binding for libgpiod v1.0.x branch

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

 



On 09. 09. 21 10:20, Bartosz Golaszewski wrote:
On Tue, Sep 7, 2021 at 6:10 PM Marek Novak | ACRIOS Systems s.r.o.
<novak@xxxxxxxxxx> wrote:

  From ca1b5688de2d1cb63bb9823e28b87c52f23df449 Mon Sep 17 00:00:00 2001
From: Marek NOVAK <novak@xxxxxxxxxx>
Date: Fri, 3 Sep 2021 18:41:02 +0200
Subject: [PATCH] Adding Lua 5.1 bindings as 'gpiod' Lua module

- Adding bindings directory with wrapper code
- Adding Makefile.am for building and distributing as a Lua module
- Adding --enable-bindings-lua option for autogen.sh
- Adding examples with basic lua gpioset and gpioget implementation
- Output, input and event input with new(), get(), set() and wait()
    methods are implemented.

Signed-off-by: Marek NOVAK <novak@xxxxxxxxxx>
---

Hi Marek!

Thanks for the patch, any new bindings are much appreciated! However
the 1.0.x branch has been unsupported for over 3 years. Why did you
decide to base your work on this one?

The currently supported branch for the 1.x series is 1.6.x but even
then I don't really want to add new features to it as we're currently
developing the 2.0 version which will become the new preferred base
for all new work. Any chance you could base your work on the
next/libgpiod-2.0 branch just like Viresh did with his Rust bindings?

Bartosz


Hi Bartosz!

Thanks for checking my patch. I later realized it was not well processed when sent using Thunderbird (I will use git send-email next time). I also learnt that on some systems, the macros from ax_lua.m4 are not available and I added it in a m4 folder. I have a v2 of the patch almost ready (build being tested on different environments by my colleagues). So I can post it here if anybody needs it on 1.x version supported...

To my motivation to select v1.0.x branch - I wanted to select a 1.x branch as base since this one is used in OpenWRT distribution (https://github.com/openwrt/packages/blob/openwrt-21.02/libs/libgpiod/Makefile). And my target use-case is to have Lua support for GPIO interaction there for some late device-specific initialization scripts.

However, I think I can switch to a 2.x version of libgpiod on our fork of OpenWRT v21.02 and base my contribution on it... Currently I use a package which builds Lua binding "out of tree", being quite ugly, but available for public here (https://sw.acrios.com/acrios/lua-gpiod). I could / should maybe also support not just Lua 5.1, but also the other actively used version of Lua...

I will update my contibution to 2.x, test it and then post it here...

---
Marek Novak
ACRIOS Systems s.r.o.





[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