perimeno / lio Goto Github PK
View Code? Open in Web Editor NEWGPIO handling in C++
License: MIT License
GPIO handling in C++
License: MIT License
Hi,
Can this be used to add a push button (input) and a led (output) to a Jetson Xavier GPIO using c++?
(tried to label as question rather than issue but don't know how sorry)
thanks
I am interested in using the library but could not find much documentation. The example is not very helpful either if you don't even know how the library works.
It would be nice to have some more examples (that also have descriptions) and to have an API documentation (maybe generated by doxygen or some similar software).
These should also be linked in the readme so that new developers can get started without many problems.
I built the lib on Raspian - hand installed includes and libs in /usr/local
My attempts to compile example.cpp report missing symbols when linked with either/or/both LIOlib & LIOLinuxlib
i.e.
g++ -L/usr/local/lib -lLIOLinuxlib -lLIOlib example.o
-o example
/usr/bin/ld: example.o: in function main': example.cpp:(.text+0x3e0): undefined reference to
LIO::DebouncedInput::DebouncedInput(LIO::InputPin&, LIO::BasicTimer&, std::chrono::duration<long long, std::ratio<1ll, 1000ll> >)'
/usr/bin/ld: example.cpp:(.text+0x404): undefined reference to LIO::DebouncedInput::setOnCallback(std::function<void ()>)' /usr/bin/ld: example.cpp:(.text+0x434): undefined reference to
LIO::DebouncedInput::setOffCallback(std::function<void ()>)'
/usr/bin/ld: example.cpp:(.text+0x470): undefined reference to LIO::InputPin::SetEventCallback(std::function<void (bool)>)' /usr/bin/ld: example.cpp:(.text+0x690): undefined reference to
LIO::DebouncedInput::~DebouncedInput()'
/usr/bin/ld: example.cpp:(.text+0x73c): undefined reference to LIO::DebouncedInput::~DebouncedInput()' /usr/bin/ld: example.o: in function
void __gnu_cxx::new_allocatorLIO::OutputSysfs::construct<LIO::OutputSysfs, int>(LIO::OutputSysfs*, int&&)':
example.cpp:(.text.ZN9__gnu_cxx13new_allocatorIN3LIO11OutputSysfsEE9constructIS2_JiEEEvPT_DpOT0[ZN9__gnu_cxx13new_allocatorIN3LIO11OutputSysfsEE9constructIS2_JiEEEvPT_DpOT0]+0x48): undefined reference to LIO::OutputSysfs::OutputSysfs(unsigned int)' /usr/bin/ld: example.o: in function
void __gnu_cxx::new_allocatorLIO::InputSysfs::construct<LIO::InputSysfs, int>(LIO::InputSysfs*, int&&)':
example.cpp:(.text.ZN9__gnu_cxx13new_allocatorIN3LIO10InputSysfsEE9constructIS2_JiEEEvPT_DpOT0[ZN9__gnu_cxx13new_allocatorIN3LIO10InputSysfsEE9constructIS2_JiEEEvPT_DpOT0]+0x48): undefined reference to LIO::InputSysfs::InputSysfs(unsigned int)' /usr/bin/ld: example.o: in function
void __gnu_cxx::new_allocatorLIO::OutputGpioLib::construct<LIO::OutputGpioLib, char const (&) [10], int>(LIO::OutputGpioLib*, char const (&) [10], int&&)':
example.cpp:(.text.ZN9__gnu_cxx13new_allocatorIN3LIO13OutputGpioLibEE9constructIS2_JRA10_KciEEEvPT_DpOT0[ZN9__gnu_cxx13new_allocatorIN3LIO13OutputGpioLibEE9constructIS2_JRA10_KciEEEvPT_DpOT0]+0x5c): undefined reference to LIO::OutputGpioLib::OutputGpioLib(char const*, unsigned int)' /usr/bin/ld: example.o: in function
void __gnu_cxx::new_allocatorLIO::InputGpioLib::construct<LIO::InputGpioLib, char const (&) [10], int>(LIO::InputGpioLib*, char const (&) [10], int&&)':
example.cpp:(.text.ZN9__gnu_cxx13new_allocatorIN3LIO12InputGpioLibEE9constructIS2_JRA10_KciEEEvPT_DpOT0[ZN9__gnu_cxx13new_allocatorIN3LIO12InputGpioLibEE9constructIS2_JRA10_KciEEEvPT_DpOT0]+0x5c): undefined reference to LIO::InputGpioLib::InputGpioLib(char const*, unsigned int)' /usr/bin/ld: example.o: in function
void __gnu_cxx::new_allocatorLIO::SoftTimer::constructLIO::SoftTimer(LIO::SoftTimer*)':
example.cpp:(.text.ZN9__gnu_cxx13new_allocatorIN3LIO9SoftTimerEE9constructIS2_JEEEvPT_DpOT0[ZN9__gnu_cxx13new_allocatorIN3LIO9SoftTimerEE9constructIS2_JEEEvPT_DpOT0]+0x2c): undefined reference to `LIO::SoftTimer::SoftTimer()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: example] Error 1
internal state changes should be independent from the callbacks
problem during edge set on RPI4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.