contrib/mraa.git
8 years agodocs: Added index for Java documentation
Mircea Bardac [Mon, 21 Sep 2015 19:26:31 +0000 (22:26 +0300)]
docs: Added index for Java documentation

Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: fix possible overrun in strncpy
Brendan Le Foll [Fri, 18 Sep 2015 10:57:41 +0000 (11:57 +0100)]
mraa.c: fix possible overrun in strncpy

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: simplify mraa_get_platform_name with subplatforms
Brendan Le Foll [Fri, 18 Sep 2015 10:52:49 +0000 (11:52 +0100)]
mraa.c: simplify mraa_get_platform_name with subplatforms

This removes the chance of buffer overflow with a subplatform

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_minnow_byt_compatible: fix memory leak
Matthew Auld [Fri, 18 Sep 2015 10:08:50 +0000 (11:08 +0100)]
intel_minnow_byt_compatible: fix memory leak

mraa_adv_func_t was allocated twice for the adv_func field

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: Added check for NULL i2c context
Henry Bruce [Wed, 16 Sep 2015 22:19:20 +0000 (15:19 -0700)]
i2c.c: Added check for NULL i2c context

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoRevert "intel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA"
Brendan Le Foll [Wed, 16 Sep 2015 06:42:35 +0000 (07:42 +0100)]
Revert "intel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA"

This reverts commit 5c7bab1c79c0d3102d299137335b19f2b632fafe. Fixes #280.

8 years agominnowboardmax: Add support for compatible boards
Evan Steele [Tue, 15 Sep 2015 14:35:26 +0000 (15:35 +0100)]
minnowboardmax: Add support for compatible boards

Signed-off-by: Evan Steele <evan.steele@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_galileo_rev_g.c: Fix uninitialized subplatform on Galileo Gen2
Petre Eftime [Tue, 15 Sep 2015 09:44:47 +0000 (12:44 +0300)]
intel_galileo_rev_g.c: Fix uninitialized subplatform on Galileo Gen2

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraajava.i: Initialize mraa when library is loaded by the JVM
Petre Eftime [Mon, 14 Sep 2015 14:13:44 +0000 (17:13 +0300)]
mraajava.i: Initialize mraa when library is loaded by the JVM

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraajava.i: Return array properly for SPI write
Petre Eftime [Mon, 14 Sep 2015 14:12:43 +0000 (17:12 +0300)]
mraajava.i: Return array properly for SPI write

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA
Jonas Norling [Mon, 7 Sep 2015 13:46:21 +0000 (15:46 +0200)]
intel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA

Calling mraa_intel_edison_misc_spi() is not really needed, because the
GPIO 10..13 pins will be configured correctly when the user actually
inits them as GPIO pins. When using these pins for GPIO,
mraa_setup_mux_mapped() and mraa_intel_edison_gpio_init_post() will do
all this work based on the pin map and pinmodes for the Edison Arduino
board.

On the contrary, this function would break any user of the SPI bus
that is already running.

Signed-off-by: Jonas Norling <jonas.norling@connode.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.hpp: Added missing include for types.hpp
Alex Tereschenko [Sun, 13 Sep 2015 15:29:20 +0000 (17:29 +0200)]
uart.hpp: Added missing include for types.hpp

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocommon.hpp: inlined getSubPlatformIndex to avoid multiple defs
Mihai Tudor Panu [Fri, 11 Sep 2015 23:09:35 +0000 (16:09 -0700)]
common.hpp: inlined getSubPlatformIndex to avoid multiple defs

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-i2c.c: remove unused arguments to printf statements
Brendan Le Foll [Tue, 8 Sep 2015 14:09:28 +0000 (15:09 +0100)]
mraa-i2c.c: remove unused arguments to printf statements

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoaio.c: missing free for aio contexts in error cases for _init()
Brendan Le Foll [Tue, 8 Sep 2015 14:09:06 +0000 (15:09 +0100)]
aio.c: missing free for aio contexts in error cases for _init()

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_galileo_rev_d.c: Fixed missing goto leaving board unfreed in error case
Brendan Le Foll [Tue, 8 Sep 2015 14:00:40 +0000 (15:00 +0100)]
intel_galileo_rev_d.c: Fixed missing goto leaving board unfreed in error case

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoaio.c: missing return for internal init
Brendan Le Foll [Tue, 8 Sep 2015 13:58:55 +0000 (14:58 +0100)]
aio.c: missing return for internal init

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.hpp: remove unused args parameter from Java isr method
Petre Eftime [Tue, 8 Sep 2015 11:52:37 +0000 (14:52 +0300)]
gpio.hpp: remove unused args parameter from Java isr method

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: Add types.hpp; Use types.hpp for C++ and SWIG
Petre Eftime [Wed, 26 Aug 2015 08:17:23 +0000 (11:17 +0300)]
mraa: Add types.hpp; Use types.hpp for C++ and SWIG

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoft4222: Add documentation for usb platform
Brendan Le Foll [Mon, 7 Sep 2015 10:39:58 +0000 (11:39 +0100)]
ft4222: Add documentation for usb platform

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agohellomraa.c: Remove i2c calls
Brendan Le Foll [Mon, 7 Sep 2015 10:12:07 +0000 (11:12 +0100)]
hellomraa.c: Remove i2c calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: Remove global advance_func struct and place it in platform configuration
Brendan Le Foll [Thu, 3 Sep 2015 14:28:36 +0000 (15:28 +0100)]
mraa: Remove global advance_func struct and place it in platform configuration

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoftdi_ft4222.c: clean up, styling fix
Brendan Le Foll [Tue, 25 Aug 2015 14:51:02 +0000 (15:51 +0100)]
ftdi_ft4222.c: clean up, styling fix

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: remove FTDI D2xx flag
Brendan Le Foll [Tue, 25 Aug 2015 14:48:43 +0000 (15:48 +0100)]
cmake: remove FTDI D2xx flag

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-i2c: Updated to use new sub-platform API.
Henry Bruce [Tue, 11 Aug 2015 00:18:32 +0000 (17:18 -0700)]
mraa-i2c: Updated to use new sub-platform API.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-gpio: Support new sub-platform calls.
Henry Bruce [Thu, 20 Aug 2015 19:09:37 +0000 (12:09 -0700)]
mraa-gpio: Support new sub-platform calls.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoapi: Added API calls that support both main and sub platforms
Henry Bruce [Thu, 20 Aug 2015 19:08:57 +0000 (12:08 -0700)]
api: Added API calls that support both main and sub platforms

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoft4222.c: Fixed bug in write_byte_data
Henry Bruce [Thu, 20 Aug 2015 19:02:32 +0000 (12:02 -0700)]
ft4222.c: Fixed bug in write_byte_data

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocommon.hpp: Removed platform selection methods.
Henry Bruce [Thu, 20 Aug 2015 18:59:07 +0000 (11:59 -0700)]
common.hpp: Removed platform selection methods.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agotypes.h: Added NULL platform
Henry Bruce [Mon, 17 Aug 2015 22:54:40 +0000 (15:54 -0700)]
types.h: Added NULL platform

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: Disable USB sub-platform support by default
Henry Bruce [Mon, 17 Aug 2015 22:53:40 +0000 (15:53 -0700)]
cmake: Disable USB sub-platform support by default

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: usb MRAA_UNKNOWN_PLATFORM is not considered initialisation
Brendan Le Foll [Tue, 11 Aug 2015 10:54:11 +0000 (11:54 +0100)]
mraa.c: usb MRAA_UNKNOWN_PLATFORM is not considered initialisation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fix current_plat being invalid but not NULL
Brendan Le Foll [Tue, 11 Aug 2015 10:45:55 +0000 (11:45 +0100)]
mraa.c: Fix current_plat being invalid but not NULL

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: add ${mraa_LIBS} to linker for swig libraries
Brendan Le Foll [Tue, 11 Aug 2015 10:36:38 +0000 (11:36 +0100)]
cmake: add ${mraa_LIBS} to linker for swig libraries

This means that the correct libraries are added when mraa_LIBS is appended,
fixes ft4222 handling with SWIG APIs

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocommon.hpp: Added sub platform API calls.
Henry Bruce [Tue, 11 Aug 2015 00:16:35 +0000 (17:16 -0700)]
common.hpp: Added sub platform API calls.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoapi: Renamed some sub-platform API calls.
Henry Bruce [Tue, 11 Aug 2015 00:16:00 +0000 (17:16 -0700)]
api: Renamed some sub-platform API calls.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa-i2c: Added interactive mode.
Henry Bruce [Tue, 11 Aug 2015 00:15:09 +0000 (17:15 -0700)]
mraa-i2c: Added interactive mode.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agotests: make tests work on python3
Brendan Le Foll [Tue, 11 Aug 2015 10:24:22 +0000 (11:24 +0100)]
tests: make tests work on python3

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: USB source files now added to mraa_LIB_PLAT_SRCS_NOAUTO
Henry Bruce [Tue, 4 Aug 2015 19:29:02 +0000 (12:29 -0700)]
cmake: USB source files now added to mraa_LIB_PLAT_SRCS_NOAUTO

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c: mraa_i2c_init_raw fixed and sub-platform updates.
Henry Bruce [Tue, 4 Aug 2015 19:27:57 +0000 (12:27 -0700)]
i2c: mraa_i2c_init_raw fixed and sub-platform updates.

mraa_i2c_init_raw now works again without platfrorm defined.
More API calls now support sub-platform

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb.c: move usb platform not found msg to debug
Brendan Le Foll [Fri, 31 Jul 2015 10:21:29 +0000 (11:21 +0100)]
usb.c: move usb platform not found msg to debug

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: use #if defined() for platforms
Brendan Le Foll [Fri, 31 Jul 2015 10:18:24 +0000 (11:18 +0100)]
mraa.c: use #if defined() for platforms

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa.c: Fixed bug in detected main/sub platform name and type logging
Henry Bruce [Thu, 30 Jul 2015 19:15:03 +0000 (12:15 -0700)]
mraa.c: Fixed bug in detected main/sub platform name and type logging

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoftdi_ft4222.c: Removed i2c read/write logging messages.
Henry Bruce [Thu, 30 Jul 2015 19:12:24 +0000 (12:12 -0700)]
ftdi_ft4222.c: Removed i2c read/write logging messages.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Removed spurious logging message
Henry Bruce [Thu, 30 Jul 2015 19:11:33 +0000 (12:11 -0700)]
gpio.c: Removed spurious logging message

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoftdi_ft4222.c: Implemented i2c_frequency().
Henry Bruce [Tue, 28 Jul 2015 23:36:19 +0000 (16:36 -0700)]
ftdi_ft4222.c: Implemented i2c_frequency().

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_has_sub_platform() function
Henry Bruce [Tue, 28 Jul 2015 23:35:18 +0000 (16:35 -0700)]
api: Added mraa_has_sub_platform() function

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: Added gpio isr support to ft4222
Henry Bruce [Mon, 27 Jul 2015 18:09:10 +0000 (11:09 -0700)]
usb: Added gpio isr support to ft4222

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

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agousb: Added gpio read/write support for ft4222 with i/o expander
Henry Bruce [Mon, 27 Jul 2015 16:39:15 +0000 (09:39 -0700)]
usb: Added gpio read/write support for ft4222 with i/o expander

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
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>