LIB_SUFFIX is no longer used. Replaced with LIB_INSTALL_DIR
which provides the correct lib dir with arch suffix.
Moved the call to include(GNUInstallDirs) prior to checking the
CMAKE_INSTALL_LIBDIR - which is set by include(GNUInstallDirs).
Tested with cmake 2.8 and cmake 3.5.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
We rely on driver-supplied information in mraa_spi_frequency(),
so let's be consistent.
Closes#132.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
ioctl() returns -1 on error, or otherwise a value certainly not within the
mraa_result_t enum. Fixes#480.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Whilst not the cleanest and the headers could do with an update, this is a
short term solution to stop the warnings
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Currently, node modules install under the current environment's
node install path. This happens even if cmake is passed a
CMAKE_INSTALL_PREFIX.
This change checks if a CMAKE_INSTALL_PREFIX has been provided,
in which case it prepens the install path to the NODE_MODULE_INSTALL_PATH.
If a CMAKE_INSTALL_PREFIX has NOT been provided, the the mraa node
modules get install according to the NODE_ROOT_DIR.
This fixes a problem with an install case where the caller does not
have write access to the NODE_ROOT_DIR.
Signed-off-by: Noel Eck <noel.eck@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
mraa_LIB_PLAT_SRCS_NOAUTO no longer used for firmata unlike USBPLAT but
mraa_LIB_SRCS_NOAUTO and this is now loaded before the standard src files for
mraa. The package still needs to be generated with IMRAA & FIRMATA enabled for
this to work.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This does now mean that modules won't go to /usr/local with the default prefix
but may instead try to install in /usr/lib. However if using nvm they should go
to the right place as long as NODE_ROOT_DIR is set correctly. This commit
changes NODE_ROOT_DIR to actually refer to the root directory of node rather
than the include dir which is what FindNodejs gets
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Imraa allows the automatic flashing and setup of arduino101 subplatforms as
well as the initial setup of GPIO/i2c devices
Signed-off-by: Longwei Su <lsu@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This fixes bugs when USBPLAT or FIRMATA is enabled when a NULL platform is
added or even a platform without ADC
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
INFO is not a valid cmake message mode, this commit cleans up a few messages to
use the correct cmake modes
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Add pin commands. Old mraa_setup_mux_mapped style is used for other boards
(pincmd = PINCMD_UNDEFINED) where pincmds are not defined.Remove useless
pullup_enable code, Galileo Gen2: review all pin mux and add commands Galileo
Gen2: remove doubled functionality: mraa_intel_galileo_gen2_i2c_init_pre and
mraa_intel_galileo_gen2_uart_init_pre. Galileo Gen2: fix "Invalid AIO pin
specified - do you have an ADC?" error. Galileo Gen2: pullup/pulldown
resistors are disabled during UART/GPIO/SPI/I2C/UIO initialization. Use
mraa_gpio_mode to enable resistors.
Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
We should throw exception but SWIG_Error causes a seg fault.
We should use syslog instead of stderr but syslog.h is not swigable
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
To ensure backwards comptability MRAA_ERROR_PLATFORM_ALREADY_INITIALISED
remains as member of mraa_result_t but now has same code as MRAA_SUCCESS
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
This is a partial replication of firmata branch commit 2f25468
as that patch would not apply to the javacheck2 branch
Signed-off-by: Henry Bruce <henry.bruce@intel.com>