contrib/mraa.git
8 years agoi2c.c: Refactored init calls to use mraa_i2c_init_internal()
Henry Bruce [Mon, 27 Jul 2015 16:38:06 +0000 (09:38 -0700)]
i2c.c: Refactored init calls to use mraa_i2c_init_internal()

mraa_i2c_init_internal() implenents logic of mraa_i2c_init_raw()
allowing mraa_adv_func_t to be passed in as a parameter
instead of of being global.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Added mainn and sub-platform select API calls.
Henry Bruce [Mon, 27 Jul 2015 16:32:39 +0000 (09:32 -0700)]
mraa.c: Added mainn and sub-platform select API calls.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: USB sub-platform bug fixes.
Henry Bruce [Thu, 23 Jul 2015 22:32:26 +0000 (15:32 -0700)]
usb: USB sub-platform bug fixes.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoapi: Added mraa_get_sub_platform_type()
Henry Bruce [Thu, 23 Jul 2015 21:56:03 +0000 (14:56 -0700)]
api: Added mraa_get_sub_platform_type()

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: Set install prefix to /usr for RPM packaging
Henry Bruce [Thu, 23 Jul 2015 21:55:02 +0000 (14:55 -0700)]
cmake: Set install prefix to /usr for RPM packaging

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agox86: advance_func now stored in mraa_board_t instance
Henry Bruce [Fri, 3 Jul 2015 00:56:24 +0000 (17:56 -0700)]
x86: advance_func now stored in mraa_board_t instance

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: Updated ft4222 device detection
Henry Bruce [Fri, 3 Jul 2015 00:54:22 +0000 (17:54 -0700)]
usb: Updated ft4222 device detection

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoplatform_type: platform_type now in mraa_board_t
Henry Bruce [Wed, 1 Jul 2015 17:24:39 +0000 (10:24 -0700)]
platform_type: platform_type now in mraa_board_t

Now platform_type is no longer global it tracks with board instance
so that platform and sub-platform can report different types.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_edison: Now uses mraa_board_t instance of advanced function table
Henry Bruce [Wed, 1 Jul 2015 17:20:34 +0000 (10:20 -0700)]
intel_edison: Now uses mraa_board_t instance of advanced function table

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: Converted sub-platform bus/pin helper macros to functions.
Henry Bruce [Fri, 26 Jun 2015 21:22:09 +0000 (14:22 -0700)]
usb: Converted sub-platform bus/pin helper macros to functions.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: add FTDI FT4222 support
Henry Bruce [Fri, 26 Jun 2015 20:48:23 +0000 (13:48 -0700)]
cmake: add FTDI FT4222 support

Existing FTDI D2xx support is just for serial comms library
but FT4222 needs a different library for i2c operation.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: add -DFTDID2xx and use FindFtd2xx.cmake
Brendan Le Foll [Fri, 26 Jun 2015 12:44:38 +0000 (13:44 +0100)]
cmake: add -DFTDID2xx and use FindFtd2xx.cmake

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: subplatforms need to be defined after platforms
Brendan Le Foll [Fri, 26 Jun 2015 08:59:40 +0000 (09:59 +0100)]
mraa.c: subplatforms need to be defined after platforms

This also means arm subplatforms can work and removes a plat == NULL check
which will never be true if -DUSBPLAT=ON

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoexamples: Created mraa-i2c tool for i2c layer testing.
Henry Bruce [Sat, 30 May 2015 00:21:47 +0000 (17:21 -0700)]
examples: Created mraa-i2c tool for i2c layer testing.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: Skeleton platform code for FTDI FT4222 USB to i2c bridge
Henry Bruce [Wed, 27 May 2015 22:36:46 +0000 (15:36 -0700)]
usb: Skeleton platform code for FTDI FT4222 USB to i2c bridge

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.7.5 v0.7.5
Brendan Le Foll [Mon, 7 Sep 2015 09:58:02 +0000 (10:58 +0100)]
mraa: update to version 0.7.5

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobinding.gyp.cmake: Fix npm builds for ia32 node.js 0.10.x
Brendan Le Foll [Mon, 7 Sep 2015 09:53:02 +0000 (10:53 +0100)]
binding.gyp.cmake: Fix npm builds for ia32 node.js 0.10.x

Node.js 0.10.x seems to struggle with the 'or' directive. Fixes #272

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agonuc5: Add i2c support for intel 5th generation NUC
Brendan Le Foll [Thu, 3 Sep 2015 10:23:35 +0000 (11:23 +0100)]
nuc5: Add i2c support for intel 5th generation NUC

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.7.4 v0.7.4
Brendan Le Foll [Mon, 24 Aug 2015 10:28:23 +0000 (11:28 +0100)]
mraa: update to version 0.7.4

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: Fix return value check for tcflush()
Brendan Le Foll [Wed, 2 Sep 2015 13:39:54 +0000 (14:39 +0100)]
uart.c: Fix return value check for tcflush()

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: fix segfault on isrExit in python because of double Py_DECREF
Brendan Le Foll [Tue, 1 Sep 2015 13:54:38 +0000 (14:54 +0100)]
gpio.c: fix segfault on isrExit in python because of double Py_DECREF

Py_DECREF is not required here as no interpreter is clever enough to handle
this reference causing a double free on isrExit(). Closes #265

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_max.c: add support for uart
Brendan Le Foll [Tue, 1 Sep 2015 09:31:12 +0000 (10:31 +0100)]
intel_minnow_max.c: add support for uart

Closes #266

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointernals.md: Add doc to explain pwm internally is all in us
Brendan Le Foll [Thu, 27 Aug 2015 16:03:39 +0000 (17:03 +0100)]
internals.md: Add doc to explain pwm internally is all in us

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_de3815.c: Use MRAA_INTEL_DE3815_PINCOUNT macro for pincount
Brendan Le Foll [Wed, 26 Aug 2015 15:52:41 +0000 (16:52 +0100)]
intel_de3815.c: Use MRAA_INTEL_DE3815_PINCOUNT macro for pincount

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoedison.md: Add warning for gpio 4 on miniboard
Brendan Le Foll [Tue, 25 Aug 2015 14:02:01 +0000 (15:02 +0100)]
edison.md: Add warning for gpio 4 on miniboard

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocommon.hpp: add C++ bindings for i2c bus number functions
Brendan Le Foll [Tue, 25 Aug 2015 10:36:05 +0000 (11:36 +0100)]
common.hpp: add C++ bindings for i2c bus number functions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_max.c: change i2c bus count to 0
Brendan Le Foll [Tue, 25 Aug 2015 09:55:30 +0000 (10:55 +0100)]
intel_minnow_max.c: change i2c bus count to 0

There are technically two i2c buses that are user accesible on minnowboard max
but the other one is on the high speed expansion header that I've never tested
and it's not mapped in mraa so leave this to 1 until someone enables it.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Add new API to support I2C bus number query
Yong Li [Tue, 25 Aug 2015 07:04:38 +0000 (15:04 +0800)]
mraa.c: Add new API to support I2C bus number query

Add two new API to get the usable I2C bus count and related I2C adapter number

Signed-off-by: Yong Li <yong.b.li@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: mraa cpack package name does not need major version appended
Brendan Le Foll [Mon, 24 Aug 2015 17:05:25 +0000 (18:05 +0100)]
cmake: mraa cpack package name does not need major version appended

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojava/CMakeLists.txt: re-changed install path to a more suitable one
Andrei Vasiliu [Mon, 24 Aug 2015 14:10:33 +0000 (17:10 +0300)]
java/CMakeLists.txt: re-changed install path to a more suitable one

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojava/CMakeLists.txt: changed install path of jar and library for bindings
Andrei Vasiliu [Fri, 21 Aug 2015 16:10:15 +0000 (19:10 +0300)]
java/CMakeLists.txt: changed install path of jar and library for bindings

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: mraa cpack package does not have debian naming anymore
Brendan Le Foll [Mon, 24 Aug 2015 10:27:26 +0000 (11:27 +0100)]
cmake: mraa cpack package does not have debian naming anymore

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-gpio.c: Solved issue with getchar() call on Galileo
Andrei Vasiliu [Fri, 21 Aug 2015 08:37:33 +0000 (11:37 +0300)]
mraa-gpio.c: Solved issue with getchar() call on Galileo

There is a problem with missing symbols __fgetc_unlocked and __stdin in the
libc library build for Galileo. Solved this by replacing the getchar() call
with fscanf().

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_max.c: Fix default i2c bus mechanism
Brendan Le Foll [Thu, 20 Aug 2015 22:12:37 +0000 (23:12 +0100)]
intel_minnow_max.c: Fix default i2c bus mechanism

Fixes #251. default_i2c_bus was set to 7 before setting actual parameters for
it leading to obvious failure as 0 != 7

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix close/free fail introduced earlier
Brendan Le Foll [Thu, 20 Aug 2015 18:09:42 +0000 (19:09 +0100)]
mraa.c: Fix close/free fail introduced earlier

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix error handing resource leaks in mraa_file_contains_*
Brendan Le Foll [Fri, 14 Aug 2015 14:36:50 +0000 (15:36 +0100)]
mraa.c: Fix error handing resource leaks in mraa_file_contains_*

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: add option to disable example building
Brendan Le Foll [Fri, 14 Aug 2015 13:35:35 +0000 (14:35 +0100)]
cmake: add option to disable example building

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: add debug syslog message for i2c bus path
Brendan Le Foll [Fri, 14 Aug 2015 10:18:24 +0000 (11:18 +0100)]
i2c.c: add debug syslog message for i2c bus path

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: log level syslog messages
Brendan Le Foll [Fri, 14 Aug 2015 10:15:57 +0000 (11:15 +0100)]
mraa.c: log level syslog messages

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoraspberry_pi.c: Fix use of non initialised pincount value
Brendan Le Foll [Thu, 13 Aug 2015 14:28:31 +0000 (15:28 +0100)]
raspberry_pi.c: Fix use of non initialised pincount value

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobeaglebone.c: Fix resource leaks with capepath in error path
Brendan Le Foll [Thu, 13 Aug 2015 14:26:37 +0000 (15:26 +0100)]
beaglebone.c: Fix resource leaks with capepath in error path

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix ressource leaks during error handling
Brendan Le Foll [Thu, 13 Aug 2015 14:25:59 +0000 (15:25 +0100)]
mraa.c: Fix ressource leaks during error handling

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobuilding.md: Add instructions for cpack
Brendan Le Foll [Fri, 31 Jul 2015 14:01:03 +0000 (15:01 +0100)]
building.md: Add instructions for cpack

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobeaglebone.c: Add PWM pinmaps
Salah-Eddine Missri [Thu, 30 Jul 2015 16:57:16 +0000 (18:57 +0200)]
beaglebone.c: Add PWM pinmaps

Signed-off-by: Salah-Eddine Missri <missrisalaheddine@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agopwm.c: Fix warnings due to unescaped %
Salah-Eddine Missri [Wed, 29 Jul 2015 12:56:05 +0000 (14:56 +0200)]
pwm.c: Fix warnings due to unescaped %

Signed-off-by: Salah-Eddine Missri <missrisalaheddine@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobeaglebone.c: Fix warnings in due to syslog 'too many arguments'
Salah-Eddine Missri [Wed, 29 Jul 2015 12:50:45 +0000 (14:50 +0200)]
beaglebone.c: Fix warnings in due to syslog 'too many arguments'

Signed-off-by: Salah-Eddine Missri <missrisalaheddine@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobeaglebone.c: Add PWM output configuration
Salah-Eddine Missri [Wed, 29 Jul 2015 12:20:33 +0000 (14:20 +0200)]
beaglebone.c: Add PWM output configuration

Signed-off-by: Salah-Eddine Missri <missrisalaheddine@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoarm: Use define MRAA_PIN_NAME_SIZE for pin names
Brendan Le Foll [Thu, 30 Jul 2015 09:15:31 +0000 (10:15 +0100)]
arm: Use define MRAA_PIN_NAME_SIZE for pin names

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobeaglebone.c: remove freeing of NULL var
Brendan Le Foll [Thu, 30 Jul 2015 08:58:25 +0000 (09:58 +0100)]
beaglebone.c: remove freeing of NULL var

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogalileorevh.md: Add instructions for using uart1 on gen2
Brendan Le Foll [Tue, 28 Jul 2015 08:32:12 +0000 (09:32 +0100)]
galileorevh.md: Add instructions for using uart1 on gen2

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agonpm.md: Add warning to not use npm pkgs for cross compilation
Brendan Le Foll [Fri, 24 Jul 2015 13:05:54 +0000 (14:05 +0100)]
npm.md: Add warning to not use npm pkgs for cross compilation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agonpm: Fix npm builds for ARM hosts
Brendan Le Foll [Fri, 24 Jul 2015 13:07:00 +0000 (13:07 +0000)]
npm: Fix npm builds for ARM hosts

NPM builds don't support cross compiling and will always compile for the host.
Binding.gyp now uses mraa_NPM_SRCS instead of mraa_LIB_SRCS_NOAUTO which
contains all platforms. Cmake now uses mraa_LIB_PLAT_SRCS_NOAUTO to provide all
the sources. NPM builds will build objects for all platforms reguardless of
space which does meann slightly bigger binaries.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: fix ARMPLAT elif not being done on define like if statement
Brendan Le Foll [Fri, 24 Jul 2015 12:34:41 +0000 (12:34 +0000)]
mraa.c: fix ARMPLAT elif not being done on define like if statement

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: Fixed UART initialization, now we set and apply defaults
Alex Tereschenko [Sun, 19 Jul 2015 19:50:52 +0000 (21:50 +0200)]
uart.c: Fixed UART initialization, now we set and apply defaults

Closes #221.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoexamples/uart.c: Add a _read call to example
Brendan Le Foll [Sun, 19 Jul 2015 11:39:45 +0000 (12:39 +0100)]
examples/uart.c: Add a _read call to example

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoraspberry_pi.c: Use define MRAA_PIN_NAME_SIZE for pin names
Alexandru Elisei [Thu, 16 Jul 2015 13:22:49 +0000 (13:22 +0000)]
raspberry_pi.c: Use define MRAA_PIN_NAME_SIZE for pin names

Signed-off-by: Alexandru Elisei <alexandru.elisei@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojava: append -fpermissive to CMAKE_CXX_FLAGS rather than override
Mihai Tudor Panu [Wed, 15 Jul 2015 21:28:10 +0000 (14:28 -0700)]
java: append -fpermissive to CMAKE_CXX_FLAGS rather than override

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobuilding.md: add instructions for java bindings on Arch
Brendan Le Foll [Thu, 16 Jul 2015 10:33:03 +0000 (11:33 +0100)]
building.md: add instructions for java bindings on Arch

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix buffer overfow in mraa_find_i2c_bus
Brendan Le Foll [Wed, 15 Jul 2015 12:50:28 +0000 (13:50 +0100)]
mraa.c: Fix buffer overfow in mraa_find_i2c_bus

All files in sysfs are 4K minimum so allocate a 4k buffer to hold the result -
even if it'll never be that big

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: add nodejs executable name
Justin Brown [Fri, 10 Jul 2015 22:45:25 +0000 (15:45 -0700)]
cmake: add nodejs executable name

The Debian package names the executable nodejs instead of node

Signed-off-by: Justin Brown <justin.m.brown@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: add internal mraa_find_i2c_bus function
Brendan Le Foll [Fri, 10 Jul 2015 16:52:50 +0000 (17:52 +0100)]
mraa: add internal mraa_find_i2c_bus function

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years ago.travis.yml: Add travis file
Brendan Le Foll [Wed, 8 Jul 2015 12:51:28 +0000 (13:51 +0100)]
.travis.yml: Add travis file

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.7.3 v0.7.3
Brendan Le Foll [Wed, 8 Jul 2015 10:38:15 +0000 (11:38 +0100)]
mraa: update to version 0.7.3

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_de3815: avoid double free in case of error
Brendan Le Foll [Wed, 8 Jul 2015 09:29:47 +0000 (10:29 +0100)]
intel_de3815: avoid double free in case of error

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_de3815.c: Add error handling to seeks and avoid reading past buffer size
Brendan Le Foll [Wed, 8 Jul 2015 09:29:27 +0000 (10:29 +0100)]
intel_de3815.c: Add error handling to seeks and avoid reading past buffer size

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-gpio.c: add %d to printf statement
Brendan Le Foll [Wed, 8 Jul 2015 09:14:56 +0000 (10:14 +0100)]
mraa-gpio.c: add %d to printf statement

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_de3815.c: check i2c device fd
Brendan Le Foll [Wed, 8 Jul 2015 08:39:52 +0000 (09:39 +0100)]
intel_de3815.c: check i2c device fd

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_de3815.c: go up to i2c-8 to find designware i2c adapter
Brendan Le Foll [Wed, 8 Jul 2015 08:39:30 +0000 (09:39 +0100)]
intel_de3815.c: go up to i2c-8 to find designware i2c adapter

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agominnow_max.md: Remove unsuported SPI comment
Brendan Le Foll [Mon, 6 Jul 2015 12:42:02 +0000 (13:42 +0100)]
minnow_max.md: Remove unsuported SPI comment

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_max.c: Use MAX_LENGTH for strn commands
Brendan Le Foll [Mon, 6 Jul 2015 12:41:39 +0000 (13:41 +0100)]
intel_minnow_max.c: Use MAX_LENGTH for strn commands

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_max.c: Fix SPI CLK having uninitialised mux total
Brendan Le Foll [Mon, 6 Jul 2015 10:48:44 +0000 (11:48 +0100)]
intel_minnow_max.c: Fix SPI CLK having uninitialised mux total

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agopython/mraa.i: Fix memory leak on python Spi::write and I2c::write
Brendan Le Foll [Thu, 2 Jul 2015 18:17:53 +0000 (19:17 +0100)]
python/mraa.i: Fix memory leak on python Spi::write and I2c::write

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraajs.i: Fix memory leak on javascript Spi::write
Brendan Le Foll [Thu, 2 Jul 2015 18:06:59 +0000 (19:06 +0100)]
mraajs.i: Fix memory leak on javascript Spi::write

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix readlink call not terminating its buffer
Brendan Le Foll [Wed, 1 Jul 2015 09:52:31 +0000 (10:52 +0100)]
mraa.c: Fix readlink call not terminating its buffer

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_edison_fab_c.c: check fstat return value
Brendan Le Foll [Wed, 1 Jul 2015 09:42:54 +0000 (10:42 +0100)]
intel_edison_fab_c.c: check fstat return value

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio: all gpio enums prefixed with _mraa
Brendan Le Foll [Tue, 30 Jun 2015 13:46:26 +0000 (14:46 +0100)]
gpio: all gpio enums prefixed with _mraa

Enum C types for gpio where not all prefixed with mraa correctly, now fixed

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agox86: de3815: detect correct i2c-dev
Thomas Ingleby [Tue, 30 Jun 2015 13:33:22 +0000 (14:33 +0100)]
x86: de3815: detect correct i2c-dev

Will search for the designware i2c devices
Closes #198
Closes #203

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agopwm: mraa_pwm_write() should accept 1.0 as a valid percentage
Jon Trulson [Mon, 29 Jun 2015 23:31:46 +0000 (17:31 -0600)]
pwm: mraa_pwm_write() should accept 1.0 as a valid percentage

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agox86: Galileo Gen 2: add ftdi header serial
Thomas Ingleby [Mon, 29 Jun 2015 19:09:45 +0000 (20:09 +0100)]
x86: Galileo Gen 2: add ftdi header serial

Closes #138

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agouart: fix issue where a index is checked before set
Thomas Ingleby [Mon, 29 Jun 2015 18:51:34 +0000 (19:51 +0100)]
uart: fix issue where a index is checked before set

Related to #152

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agox86: edison: add check in init_pre uart hook
Thomas Ingleby [Mon, 29 Jun 2015 18:45:16 +0000 (19:45 +0100)]
x86: edison: add check in init_pre uart hook

If none 0 index passed, will log error.
Related to #152

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agocmake: add path to help find nodejs
Justin Brown [Mon, 22 Jun 2015 20:21:15 +0000 (13:21 -0700)]
cmake: add path to help find nodejs

Helps locate node-v0.12.4 built from source on Fedora 22

Signed-off-by: Justin Brown <justin.m.brown@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_edison_fab_c.c: added spi_lsbmode_replace to return proper status
Alex Tereschenko [Mon, 15 Jun 2015 19:20:02 +0000 (21:20 +0200)]
intel_edison_fab_c.c: added spi_lsbmode_replace to return proper status

Edison SPI driver doesn't support LSB_FIRST mode, we will now return
_FEATURE_NOT_SUPPORTED instead of _INVALID_RESOURCE
for attempts to enable it.

Closes #22.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.h: Fix docs that incorectly states -1 is failure
Brendan Le Foll [Sat, 20 Jun 2015 19:41:42 +0000 (20:41 +0100)]
i2c.h: Fix docs that incorectly states -1 is failure

Fixes #228

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: if BUILDSWIG is OFF then disable SWIG items
Thomas Ingleby [Thu, 18 Jun 2015 18:38:14 +0000 (19:38 +0100)]
cmake: if BUILDSWIG is OFF then disable SWIG items

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
8 years agocmake: fix version when git is pesent but no tree is found
Brendan Le Foll [Tue, 16 Jun 2015 10:12:16 +0000 (11:12 +0100)]
cmake: fix version when git is pesent but no tree is found

This avoids the version being .so.HEAD-HASH-NOTFOUND or similar when git is
present on the target but a valid tree is not found

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_galileo_rev_d.c: added spi_lsbmode_replace to return correct status.
Alex Tereschenko [Sun, 14 Jun 2015 14:45:31 +0000 (16:45 +0200)]
intel_galileo_rev_d.c: added spi_lsbmode_replace to return correct status.

Galileo Gen1 doesn't support LSB_FIRST mode, so let's
return MRAA_ERROR_FEATURE_NOT_SUPPORTED instead of <...>_INVALID_RESOURCE.

Closes #178.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agospi.c: introduced a _replace hook for spi_lsbmode()
Alex Tereschenko [Sun, 14 Jun 2015 14:42:52 +0000 (16:42 +0200)]
spi.c: introduced a _replace hook for spi_lsbmode()

This could be generally useful and more specifically is a
prerequisite for issue #178.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agospi.c: moved struct _spi declaration into mraa_internal_types.h
Alex Tereschenko [Sun, 14 Jun 2015 14:34:15 +0000 (16:34 +0200)]
spi.c: moved struct _spi declaration into mraa_internal_types.h

The declaration seems to be misplaced compared to all other similar structs.
It's also a prerequisite for introducing the _replace hook for spi_lsbmode(),
per issue #178.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agooe-sdk_cross.cmake: Added support for OpenJDK Java bindings
Andrei Vasiliu [Wed, 10 Jun 2015 13:24:38 +0000 (16:24 +0300)]
oe-sdk_cross.cmake: Added support for OpenJDK Java bindings

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c: fix return value doc for _read_bytes_data
Brendan Le Foll [Tue, 9 Jun 2015 07:25:36 +0000 (08:25 +0100)]
i2c: fix return value doc for _read_bytes_data

Closes #218

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoedison.md: corrected ADC resolution data
Alex Tereschenko [Sun, 7 Jun 2015 07:56:37 +0000 (09:56 +0200)]
edison.md: corrected ADC resolution data

Edison kit for Arduino has TI ADS7951 ADC, which has "12-stored-in-16" bit
resolution.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.7.2 v0.7.2
Brendan Le Foll [Wed, 3 Jun 2015 13:51:03 +0000 (14:51 +0100)]
mraa: update to version 0.7.2

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agobinding.gyp.cmake: fix compilation when not setting target_arch
Brendan Le Foll [Wed, 3 Jun 2015 13:40:51 +0000 (14:40 +0100)]
binding.gyp.cmake: fix compilation when not setting target_arch

NPM package now only builds x86 builds, but for npm those are the only ones
that have ever worked due to a rework of the cmake code generating the
binding.gyp file is required

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.7.1 v0.7.1
Brendan Le Foll [Tue, 2 Jun 2015 15:09:03 +0000 (16:09 +0100)]
mraa: update to version 0.7.1

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agospi.hpp: fix wrong docstrings data -> txBuf
Brendan Le Foll [Tue, 2 Jun 2015 13:28:36 +0000 (14:28 +0100)]
spi.hpp: fix wrong docstrings data -> txBuf

Closes #215

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: add links to javascript documentation
Brendan Le Foll [Tue, 2 Jun 2015 11:06:15 +0000 (12:06 +0100)]
README.md: add links to javascript documentation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart: Add c++ uart example
Brendan Le Foll [Tue, 2 Jun 2015 07:43:14 +0000 (08:43 +0100)]
uart: Add c++ uart example

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: Fix some wrong return checks
Brendan Le Foll [Tue, 2 Jun 2015 07:42:37 +0000 (08:42 +0100)]
uart.c: Fix some wrong return checks

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraajs.i: Use 0x032870 as SWIG_V8_VERSION to distinguish node.js 0.12.x
Brendan Le Foll [Mon, 1 Jun 2015 16:37:33 +0000 (17:37 +0100)]
mraajs.i: Use 0x032870 as SWIG_V8_VERSION to distinguish node.js 0.12.x

This fixes compilation with node.js 0.12.4

Closes #211

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>