lua-users home
lua-l archive

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


Hi Axel,

For an embedded system I am coding a small application, which
watches the state of certain GPIO-pins (not time critical...the
pins are changing state slllllooooowwwwllllllyyyyy ;)

For that I have to enable gpio interrupts first by writing
either "both", "falling" or "raising" in /sys/class/gpio/pc17/edge
(pc17 as an example for a certain pin) and the p/poll on 
/sys/class/gpio/pc17/value.
The whole application should take as less memory/cpu power as possible
as this is an embedded system and the software will run as daemon.

Is luvit able to catch file changes of files in the sysfs on Linux?

Best regards,
Meino




Axel Kittenberger <axkibe@gmail.com> [15-01-28 02:34]:
> By the calls you are looking for it looks like you are going to code an
> event machine.
> 
> Have you considered taking one of the already done lua event machines as
> base instead?
> 
> There is luvit, and there is levent  dunno which one can do what better.
> 
> 
> 
> On Tue, Jan 27, 2015 at 6:56 PM, <Meino.Cramer@gmx.de> wrote:
> 
> > Hi,
> >
> > currently I am experimenting with a embedded system and
> > need funktions like sleep, ppoll and such in lua.
> >
> > I installed luaposix, because both were documented on the web.
> >
> > But there was neither available via luaposix.
> >
> > A "search" via luarocks shows different other posix related
> > stuff...
> >
> > I am confused...
> >
> > Is there anything better than luaposix which has more posix stuff...
> >
> > Or didn't I understand something fundamental... ? ;)
> >
> > HELP! 8))))
> >
> > Thanks a lot in advance!
> > Best regards,
> > Meino
> >
> > PS:
> > These is what luarocks finds via "posix"
> >
> >
> > Search results:
> > ===============
> >
> > Rockspecs and source rocks:
> > ---------------------------
> >
> > lposix
> >    20031107-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    20031107-1 (src) - http://luarocks.org/repositories/rocks
> >
> > lrexlib-posix
> >    2.7.2-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.7.2-1 (src) - http://luarocks.org/repositories/rocks
> >    2.7.1-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.7.1-1 (src) - http://luarocks.org/repositories/rocks
> >    2.7.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.7.0-1 (src) - http://luarocks.org/repositories/rocks
> >    2.4.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.4.0-1 (src) - http://luarocks.org/repositories/rocks
> >    2.3.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.3.0-1 (src) - http://luarocks.org/repositories/rocks
> >    2.2.2-2 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.2.2-2 (src) - http://luarocks.org/repositories/rocks
> >    2.2.2-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    2.2.2-1 (src) - http://luarocks.org/repositories/rocks
> >
> > luaposix
> >    33.2.1-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    33.2.1-1 (src) - http://luarocks.org/repositories/rocks
> >    33.2.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    33.2.0-1 (src) - http://luarocks.org/repositories/rocks
> >    33.0.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    33.0.0-1 (src) - http://luarocks.org/repositories/rocks
> >    32-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    32-1 (src) - http://luarocks.org/repositories/rocks
> >    31-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    31-1 (src) - http://luarocks.org/repositories/rocks
> >    30-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    30-1 (src) - http://luarocks.org/repositories/rocks
> >    29-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    29-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.28-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.28-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.27-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.27-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.26-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.26-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.25-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.25-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.24-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.24-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.23-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.23-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.22-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.22-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.21-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.21-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.20-2 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.20-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.20-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.19-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.19-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.18-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.18-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.15-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.15-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.14-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.14-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.12-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.12-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.7-3 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.7-3 (src) - http://luarocks.org/repositories/rocks
> >    5.1.7-2 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.7-2 (src) - http://luarocks.org/repositories/rocks
> >    5.1.7-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.7-1 (src) - http://luarocks.org/repositories/rocks
> >    5.1.2-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    5.1.2-1 (src) - http://luarocks.org/repositories/rocks
> >
> > servicekit-posix
> >    1.0-1 (rockspec) - http://luarocks.org/repositories/rocks
> >    1.0-1 (src) - http://luarocks.org/repositories/rocks
> >
> >
> >