Removed all references to #ifdef SWIGJAVA and JAVACALLBACK from the
library source. All java-specific source code has been moved to the
corresponding library's .i file for java.
* Update library source
* Update examples where necessary
* The function pointer methodology has been remove from libraries
which provided callbacks as both a class and a function pointer
implementation. Examples were updated to use the class version
of callbacks.
* Updated documentation for SWIGJAVA
Signed-off-by: Noel Eck <noel.eck@intel.com>
Previously the JAVA packages re-compile UPM library source files. This
was a work-around for compiling JAVA-specific functionality from the UPM
source into the SWIG'ed JAVA pacakges.
This commit removes the source from the JAVA SWIG compile and provides
an example on how to add the JAVA-specific code with a swig extend call.
* Added _upm.i file for %import (not %include)
* Added macros to _upm.i; 1 which performs the loadLibrary, and one
which adds the java installISR runnable.
* Updated the src/CMakeLists.txt file to NOT build library src into
pacakges.
* Updated the a110x library with examples on how to use the macros.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Updated the ZFM20 class to use UART functionality provided through the
mraa::Uart class instead of using the UART directly.
* Switch to mraa::Uart
* Added raw uart string constructor, closes#621
* Updated examples
* Added a common.i to minimize interface duplication
* Removed pointers from C++ functions where references are
preferable
* Removed dependency on termios
* Added typedefs to handle pass-by-reference
* Removed flushes
* Removed code after throws
Signed-off-by: Noel Eck <noel.eck@intel.com>
Tell the linker to error on unresolved symbols. This enables future
Java work (removing library source from Java packages) by flagging
missing reference.s
TODO: Move this up one level to all libraries. The reason this was not
done in the same commit is that the NodeJs libraries contain unresolved
references which must come from node but remain unresolved in the NodeJs
packages.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Switched these macros to functions so changes at the
upm_swig_<extension> level don't propogate further than necessary.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed include for pthreads from libraries where it appears NOT to be
used. Added ${CMAKE_THREAD_LIBS_INIT} to CMakeLists.txt for libraries
which appear to require threading.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Adding STMicro LIS3DH sensor support. This module is based on
the one for lis2ds12 (thanks, jontrulson!), but as sensors are
noticeably different, the contents underwent major rework.
Examples and basic API are left the same.
Tested on Intel Edison with Arduino board using both I2C and SPI.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Previous commit failed because the C examples doesn't exist. The
version BEFORE that passes even though the C example filename pointed to
a test for a different sensor library.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Fix for case where dataAvailable always returns true. Previously, if
this ever happened (eg mock platform), string resp is resized until the
system is out of memory.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Removed the per-target install component in favor of a limited set of
insinstall components.
Available install components are: "upm" "upm-dev" "upm-java"
"upm-nodejs" "upm-python2" "upm-python3"
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit fixes issue 614. Updated the example to use pyupm_led as
the module name (and skip the local module rename).
Signed-off-by: Noel Eck <noel.eck@intel.com>
Replace TemplateItem with SensorTemplate in the sensortemplate.json and
json ctest. Change to contributions.md which removes all objects
with a key starting with "//" from the generated sensor .json file.
This allows the json ctest to pass OOTB for new sensor libraries
generated from the make_new_sensor function.
Signed-off-by: Noel Eck <noel.eck@intel.com>
CurieIMU example includes curieimu.hpp, which uses pthread symbols but
does not include pthreads.h, and thus fails building. The library
builds successfully because the source file includes the pthread
header before including curieimu.hpp.
* Moved pthread.h include from src to header.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Add documentation on how to build android packages
* Check env vars before running build-android.sh
* Add doc strings to build-android.sh
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>