contrib/mraa.git
8 years agoexamples: added more elaborated Python UART example
Alex Tereschenko [Sun, 13 Dec 2015 14:51:15 +0000 (15:51 +0100)]
examples: added more elaborated Python UART example

Closes #376.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraajava.i: The director now uses a GlobalRef instead of a WeakRef to the IsrCallback...
Stefan Andritoiu [Tue, 8 Dec 2015 17:37:38 +0000 (19:37 +0200)]
mraajava.i: The director now uses a GlobalRef instead of a WeakRef to the IsrCallback object

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years ago96boards: add support to HiKey 96board
Jorge Ramirez-Ortiz [Sat, 12 Dec 2015 12:16:45 +0000 (12:16 +0000)]
96boards: add support to HiKey 96board

This patch adds support to HiKey board which complies with 96boards spec.
More info about board @https://www.96boards.org/products/ce/hikey/

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years ago96boards: add support to 96boards (https://www.96boards.org/)
Srinivas Kandagatla [Fri, 11 Dec 2015 16:28:35 +0000 (16:28 +0000)]
96boards: add support to 96boards (https://96boards.org/)

This patch adds support to 96boards. 96boards is an open platform
specification. This spec strandardizes the pins on the external
connectors like Low speed and High speed. Given these pins are standard
across multiple boards, I think adding a generic 96boards made sense to
me.

The idea behind adding this generic board file is to make mraa work on
most of the 96boards with minimal changes to board support in libmraa.

This patch adds support to the LS expansion connector which has got 12
gpio pins + 2 i2c + 1 spi and 2 uarts.

For now I have added Dragaon board DB401c support as part of this patch
and is tested.
More info about board @ https://www.96boards.org/products/ce/dragonboard410c/

Long term plan is to get all this configuration from the /sys and
populate the board specifics dynamically, which is bit easy with
96boards specs in-place.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoTargetArch.cmake: Add support to aarch64 based platforms
Srinivas Kandagatla [Fri, 11 Dec 2015 16:28:28 +0000 (16:28 +0000)]
TargetArch.cmake: Add support to aarch64 based platforms

This patch adds support to aarch64 arm 64 bit platforms.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: make use of no_bus_mux flag
Srinivas Kandagatla [Fri, 11 Dec 2015 16:28:18 +0000 (16:28 +0000)]
uart.c: make use of no_bus_mux flag

This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agospi.c: make use of no_bus_mux flag
Srinivas Kandagatla [Fri, 11 Dec 2015 16:28:10 +0000 (16:28 +0000)]
spi.c: make use of no_bus_mux flag

This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: make use of no_bus_mux flag
Srinivas Kandagatla [Fri, 11 Dec 2015 16:26:16 +0000 (16:26 +0000)]
i2c.c: make use of no_bus_mux flag

This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: Add flags to not setup bus pinmux
Srinivas Kandagatla [Fri, 11 Dec 2015 16:25:06 +0000 (16:25 +0000)]
mraa: Add flags to not setup bus pinmux

This is an attempt to make the mraa work on wide boards with minimal
board setup.

Most of the arm boards with latest kernel have pinmux already setup by
the driver and its really not necessary for mraa to check each pin and
icheck if the pinmux is required or not. Having this flag would cut lot
of code in board support and its possible to add some generic board
support which can make use of mraa easily.

Without this patch each board support has to have pins setup in there
bus structure.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agointel_edison_fab_c.c: Remove dependency on debugfs
Mihai Serban [Mon, 9 Nov 2015 15:59:56 +0000 (17:59 +0200)]
intel_edison_fab_c.c: Remove dependency on debugfs

The MRAA library needs the debugfs interface in order to access GPIO
pin modes attributes. Mounting the debugfs is not always desirable so this
patch instructs libmraa to first check for the required attributes in
the normal SYSFS CLASS GPIO interface and to use debugfs as a fallback.

Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoedison: fix SPI IO pointers usage
Mihai Serban [Mon, 16 Nov 2015 17:10:12 +0000 (19:10 +0200)]
edison: fix SPI IO pointers usage

Check if SPI IO pointers are holding valid data before using them.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoCompile libmraa for Android and Brillo
Mihai Serban [Thu, 12 Nov 2015 16:26:23 +0000 (18:26 +0200)]
Compile libmraa for Android and Brillo

Add makefile for building libmraa library.

Import glob functionality from the NetBSD project where the glob.c and
glob.h files are released under BSD 3-clause License. Minor changes were
applied in order to make them compile for Android and Brillo.

This patch adds a control pipe used to interrupt the poll() function
as an alternative to pthread cancellation API.

Change-Id: Id719da4c839acbd320b0cc0e0113c2a5239c8029
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: enable settign of MRAAPLATFORMFORCE to reduce libmraa.so size
Brendan Le Foll [Thu, 3 Dec 2015 12:20:15 +0000 (12:20 +0000)]
cmake: enable settign of MRAAPLATFORMFORCE to reduce libmraa.so size

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years ago.travis.yml: enabled JAVA 8 builds with gcc
Mihai Tudor Panu [Tue, 1 Dec 2015 19:56:47 +0000 (11:56 -0800)]
.travis.yml: enabled JAVA 8 builds with gcc

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agocmake: use cmake includedir
Kevron Rees [Wed, 11 Nov 2015 21:43:46 +0000 (13:43 -0800)]
cmake: use cmake includedir

We need to use CMake variables to avoid installing things in the wrong places on
systems that have multilib enabled.

Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoft4222: adds initial support for on-chip GPIO in mode0
Mihai Tudor Panu [Tue, 1 Dec 2015 11:56:08 +0000 (11:56 +0000)]
ft4222: adds initial support for on-chip GPIO in mode0

This commits uses CLK_* and so requires libftdi 1.2.1.4+

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoft4222: prepares onboard gpio support in addition to i2c expander option
Mihai Tudor Panu [Tue, 1 Dec 2015 11:50:44 +0000 (11:50 +0000)]
ft4222: prepares onboard gpio support in addition to i2c expander option

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio: function replacement for gpio write calls
Mihai Tudor Panu [Fri, 20 Nov 2015 01:18:55 +0000 (17:18 -0800)]
gpio: function replacement for gpio write calls

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: Fix identation/style and simplify logic in mraa_i2c_read
Mihai Tudor Panu [Tue, 1 Dec 2015 11:48:36 +0000 (11:48 +0000)]
i2c.c: Fix identation/style and simplify logic in mraa_i2c_read

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: call correct adv func in mraa_i2c_read_byte
Mihai Tudor Panu [Tue, 1 Dec 2015 11:47:57 +0000 (11:47 +0000)]
i2c.c: call correct adv func in mraa_i2c_read_byte

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojava: Added auto load library code to the SWIG interface file
Stefan Andritoiu [Tue, 24 Nov 2015 15:03:12 +0000 (17:03 +0200)]
java: Added auto load library code to the SWIG interface file

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: updated package name in opkg command example
Alex Tereschenko [Sun, 22 Nov 2015 16:07:15 +0000 (17:07 +0100)]
README.md: updated package name in opkg command example

Closes #367.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: Add UPM style images for documentation moving links to mraa.io
Brendan Le Foll [Wed, 18 Nov 2015 13:54:55 +0000 (13:54 +0000)]
README.md: Add UPM style images for documentation moving links to mraa.io

Also adds java documentation links

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: remove outdated reference to eglibc images
Brendan Le Foll [Wed, 18 Nov 2015 13:54:12 +0000 (13:54 +0000)]
README.md: remove outdated reference to eglibc images

all IOTDK images are now 1.7 poky based which uses glibc

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: fixed typo in debug output
Alex Tereschenko [Sat, 14 Nov 2015 18:25:50 +0000 (19:25 +0100)]
uart.c: fixed typo in debug output

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: updated Edison SDK version to the latest one.
Alex Tereschenko [Tue, 17 Nov 2015 20:38:21 +0000 (21:38 +0100)]
README.md: updated Edison SDK version to the latest one.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: formatting updates to make it nicer + typo fixes.
Alex Tereschenko [Tue, 17 Nov 2015 20:33:04 +0000 (21:33 +0100)]
README.md: formatting updates to make it nicer + typo fixes.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: added install instructions per suggestion in #336.
Alex Tereschenko [Tue, 17 Nov 2015 20:19:31 +0000 (21:19 +0100)]
README.md: added install instructions per suggestion in #336.

Closes #336.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoFindNodejs.cmake: V8_VERSION_MAJOR is being set and MINOR/PATCH where empty
Brendan Le Foll [Wed, 11 Nov 2015 16:00:12 +0000 (16:00 +0000)]
FindNodejs.cmake: V8_VERSION_MAJOR is being set and MINOR/PATCH where empty

This has been wrong for a while and probably not the most important but when
node.js fails to be detected (typically this means runtime check on node.js has
failed which hopefully is rare!)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojavascript: Fix build for nodejs v5 which has smaller version string
Brendan Le Foll [Wed, 11 Nov 2015 13:47:43 +0000 (13:47 +0000)]
javascript: Fix build for nodejs v5 which has smaller version string

SWIG uses SWIG_V8_VERSION made of
0x0${V8_VERSION_MAJOR}${V8_VERSION_MINOR}${V8_VERSION_PATCH}. Because newer v8
versions don't seem to have a patch version that is padded the version string
ends up too small ending with using the node.js 0.10.x paths. This fix pads the
version string to 8chars which (we assume) is always correct. Fixes #358

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.8.1 v0.8.1
Thomas Ingleby [Mon, 2 Nov 2015 10:48:31 +0000 (11:48 +0100)]
mraa: update to version 0.8.1

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
8 years agocmake: use cmake libdir instead of making our own
Kevron Rees [Thu, 29 Oct 2015 19:59:45 +0000 (12:59 -0700)]
cmake: use cmake libdir instead of making our own

Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: enhanced Python-specific code
Alex Tereschenko [Thu, 29 Oct 2015 20:09:27 +0000 (21:09 +0100)]
gpio.c: enhanced Python-specific code

This further enhances fix introduced by commit 0836067
by adding Python 3 support and correcting Python version
hex string used in compiler directives.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoREADME.md: updated link to IoTDevKit package repo
Alex Tereschenko [Thu, 29 Oct 2015 21:01:42 +0000 (22:01 +0100)]
README.md: updated link to IoTDevKit package repo

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Fix interrupt callback args
Chris Brackert [Wed, 28 Oct 2015 16:09:06 +0000 (16:09 +0000)]
gpio.c: Fix interrupt callback args

Signed-off-by: Chris Brackert <cbrackert@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Fix python3 builds, PyString_AsString not avail
Brendan Le Foll [Tue, 27 Oct 2015 11:38:20 +0000 (11:38 +0000)]
gpio.c: Fix python3 builds, PyString_AsString not avail

Previous commit to add debugging cause python3 builds to fail because
PyString_AsString is not available on python3 since all strings are uft8

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.c: fix to UART even parity
damcclos [Mon, 26 Oct 2015 01:11:16 +0000 (18:11 -0700)]
uart.c: fix to UART even parity

Signed-off-by: David McCloskey <davmcclo@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoexamples: Fixed bug in mraa-gpio introduced by sub-platform update.
Henry Bruce [Fri, 23 Oct 2015 22:06:27 +0000 (15:06 -0700)]
examples: Fixed bug in mraa-gpio introduced by sub-platform update.

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: Fixed bug in gpio configuration
Henry Bruce [Wed, 14 Oct 2015 21:03:34 +0000 (14:03 -0700)]
ftdi_ft4222.c: Fixed bug in gpio configuration

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 previously stubbed out i2c functions.
Henry Bruce [Thu, 8 Oct 2015 20:18:06 +0000 (13:18 -0700)]
ftdi_ft4222.c: Implemented previously stubbed out i2c functions.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoi2c.c: Added missing adv_func support to some functions
Henry Bruce [Thu, 8 Oct 2015 20:19:08 +0000 (13:19 -0700)]
i2c.c: Added missing adv_func support to some functions

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoJavaScript SPI.write output correction #2
xbolshe [Thu, 22 Oct 2015 23:45:57 +0000 (02:45 +0300)]
JavaScript SPI.write output correction #2

Closes #330.

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoJavaScript SPI.write output correction
xbolshe [Thu, 22 Oct 2015 23:16:28 +0000 (02:16 +0300)]
JavaScript SPI.write output correction

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agodocs: updated Python docs index with all supported platforms
Alex T [Wed, 21 Oct 2015 20:46:51 +0000 (22:46 +0200)]
docs: updated Python docs index with all supported platforms

Also fixed #324 (broken link to Raspberry Pi page).

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agosrc/java/CMakeLists.txt: Modified path for javac and jar
Andrei Vasiliu [Thu, 8 Oct 2015 14:58:48 +0000 (17:58 +0300)]
src/java/CMakeLists.txt: Modified path for javac and jar

Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agouart.js: Rewrite of example to show more functionality
xbolshe [Fri, 9 Oct 2015 01:20:04 +0000 (04:20 +0300)]
uart.js: Rewrite of example to show more functionality

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Log more data in ISR handler on Python error
Alex Tereschenko [Fri, 2 Oct 2015 21:46:06 +0000 (23:46 +0200)]
gpio.c: Log more data in ISR handler on Python error

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Fixed typo
Alex Tereschenko [Fri, 2 Oct 2015 21:44:10 +0000 (23:44 +0200)]
gpio.c: Fixed typo

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.c: Added ISR thread termination flag
Alex Tereschenko [Fri, 2 Oct 2015 21:42:20 +0000 (23:42 +0200)]
gpio.c: Added ISR thread termination flag

Also modified ISR handler logic to account for the flag.

This fixes isrExit() deadlock in Python interactive mode
and prevents a more generic problem of a spurious ISR call
after mraa_gpio_isr_exit() is run.

Closes #268.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojavascript: Add nodejs 4.1.1 support
xbolshe [Thu, 1 Oct 2015 19:32:45 +0000 (22:32 +0300)]
javascript: Add nodejs 4.1.1 support

API changes in V8 API mean that node.js 4 needs some changes both in mraajs.i
but also require a C++11 compiler

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agogpio.h: Fixed a couple of typos in description
Alex Tereschenko [Fri, 2 Oct 2015 12:33:39 +0000 (14:33 +0200)]
gpio.h: Fixed a couple of typos in description

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years ago.travis.yml: updated travis file to use swig3 and build node.js bindings too
Mihai Tudor Panu [Mon, 21 Sep 2015 18:42:33 +0000 (11:42 -0700)]
.travis.yml: updated travis file to use swig3 and build node.js bindings too

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agodocs: Enabled samples in the Java documentation
Mircea Bardac [Thu, 1 Oct 2015 13:24:53 +0000 (16:24 +0300)]
docs: Enabled samples in the Java documentation

Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoDoxyfile.java.in: Fix lookup of SWIG generated Java files
Mircea Bardac [Thu, 1 Oct 2015 12:10:20 +0000 (15:10 +0300)]
Doxyfile.java.in: Fix lookup of SWIG generated Java files

Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoIsr.java: Fix ISR example to use pin 6 and sleep properly
Petre Eftime [Wed, 30 Sep 2015 13:12:26 +0000 (16:12 +0300)]
Isr.java: Fix ISR example to use pin 6 and sleep properly

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agosamples.mapping.txt: Add samples mapping for java samples
Petre Eftime [Wed, 30 Sep 2015 10:26:54 +0000 (13:26 +0300)]
samples.mapping.txt: Add samples mapping for java samples

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoexamples/java: Port examples containing [Interesting] tag from C/C++
Petre Eftime [Wed, 30 Sep 2015 10:22:47 +0000 (13:22 +0300)]
examples/java: Port examples containing [Interesting] tag from C/C++

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoexamples/java: Update, indent and add [Interesting] tags to examples
Petre Eftime [Wed, 30 Sep 2015 10:21:23 +0000 (13:21 +0300)]
examples/java: Update, indent and add [Interesting] tags to examples

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: Ignore read/write functions (in UART)
Petre Eftime [Wed, 30 Sep 2015 10:16:38 +0000 (13:16 +0300)]
mraajava.i: Ignore read/write functions (in UART)

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoDoxyfile.java.in: dos2unix
Brendan Le Foll [Tue, 29 Sep 2015 13:28:53 +0000 (14:28 +0100)]
Doxyfile.java.in: dos2unix

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoDoxyfile.java.in: Fixed documentation generation for Java
Mircea Bardac [Tue, 29 Sep 2015 13:26:09 +0000 (14:26 +0100)]
Doxyfile.java.in: Fixed documentation generation for Java

Signed-off-by: Mircea Bardac <mircea.bardac@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agoIsr-pin6.cpp: Add example for c++ isr
Brendan Le Foll [Tue, 29 Sep 2015 13:20:20 +0000 (14:20 +0100)]
Isr-pin6.cpp: Add example for c++ isr

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agomraa: update to version 0.8.0 v0.8.0
Brendan Le Foll [Tue, 22 Sep 2015 15:57:01 +0000 (16:57 +0100)]
mraa: update to version 0.8.0

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
8 years agojava: Add java doxygen files
Brendan Le Foll [Tue, 22 Sep 2015 15:39:48 +0000 (16:39 +0100)]
java: Add java doxygen files

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