contrib/mraa.git
9 years agoi2c: add busnum to context
Brendan Le Foll [Wed, 10 Dec 2014 00:33:34 +0000 (00:33 +0000)]
i2c: add busnum to context

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: remove hz from context
Brendan Le Foll [Wed, 10 Dec 2014 00:33:16 +0000 (00:33 +0000)]
i2c: remove hz from context

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: set_frequency now takes a mraa_i2c_mode_t
Brendan Le Foll [Wed, 10 Dec 2014 00:32:17 +0000 (00:32 +0000)]
i2c: set_frequency now takes a mraa_i2c_mode_t

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agohelloedison.c: add edison type example
Brendan Le Foll [Mon, 5 Jan 2015 14:35:56 +0000 (14:35 +0000)]
helloedison.c: add edison type example

This small example shows the use of mraa_get_pin and documents the owner
concept

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agotypes.h: add edison numbering enums
Brendan Le Foll [Mon, 5 Jan 2015 12:23:34 +0000 (12:23 +0000)]
types.h: add edison numbering enums

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio: Add a function to get a pin number from mraa_gpio_context
yoneken [Sun, 21 Dec 2014 11:31:59 +0000 (20:31 +0900)]
gpio: Add a function to get a pin number from mraa_gpio_context

Signed-off-by: Kenta Yonekura <yoneken@ieee.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agox86/galileo-gen2: Speed up mraa_gpio_dir
Kurt Eckhardt [Thu, 11 Dec 2014 00:25:12 +0000 (16:25 -0800)]
x86/galileo-gen2: Speed up mraa_gpio_dir

Made like changes to Edison to cache the output enable.

Note: different than Edison as the pin structure holds enable pin number
instead of external array.

2nd note: noticed PU resistors are also in structure but there is also
external array.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agox86/edison: Speed up mraa_gpio_dir
Kurt Eckhardt [Thu, 18 Dec 2014 16:03:46 +0000 (16:03 +0000)]
x86/edison: Speed up mraa_gpio_dir

Reasonable speed up in the mraa_gpio_dir on the Edison Arduino board

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: add advance_func->gpio_close_pre
Kurt Eckhardt [Thu, 18 Dec 2014 14:20:14 +0000 (14:20 +0000)]
gpio.c: add advance_func->gpio_close_pre

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocontributing.md: fix styling issues
Brendan Le Foll [Thu, 18 Dec 2014 22:39:34 +0000 (22:39 +0000)]
contributing.md: fix styling issues

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: mraa_pin_mode_test should check against b->gpio_count -1
Brendan Le Foll [Thu, 18 Dec 2014 14:20:14 +0000 (14:20 +0000)]
mraa.c: mraa_pin_mode_test should check against b->gpio_count -1

It's already the case for rpi & MMAX but it should be noted that on 1 indexed
boards gpio_count should be +1

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: add syslog msg in case we get an unknown pinmode
Brendan Le Foll [Thu, 18 Dec 2014 14:13:04 +0000 (14:13 +0000)]
mraa.c: add syslog msg in case we get an unknown pinmode

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: fix uart mraa_pin_mode_test
Brendan Le Foll [Thu, 18 Dec 2014 14:11:25 +0000 (14:11 +0000)]
mraa.c: fix uart mraa_pin_mode_test

switch statement was missing a clause for MRAA_PIN_UART meaning it always
returned False

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: fix aio mraa_pin_mode_test
Brendan Le Foll [Thu, 18 Dec 2014 14:07:57 +0000 (14:07 +0000)]
mraa.c: fix aio mraa_pin_mode_test

test was adding board gpio_count to pin so that 0 would use the info for pin 14
on some boards when asking for aio capability

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: Fixed potential segfault on free()-ing NULL in mraa_deinit()
Alex Tereschenko [Tue, 16 Dec 2014 21:12:18 +0000 (22:12 +0100)]
mraa.c: Fixed potential segfault on free()-ing NULL in mraa_deinit()

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: remove DEBUG define
Brendan Le Foll [Tue, 16 Dec 2014 20:38:06 +0000 (20:38 +0000)]
mraa.c: remove DEBUG define

debug DEFINE crept in from 6bc2b0fb53865c85c786f7f2a0393d88e7784c08

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: added user check into mraa_init() & increase verbosity
Alex Tereschenko [Mon, 15 Dec 2014 21:40:57 +0000 (22:40 +0100)]
mraa.c: added user check into mraa_init() & increase verbosity

mraa_init() will now:
- print user name and EUID of the process instead of UID,
- print full platform text name in addition to numeric type,
- return, log and print an error if started by non-root user

Fixes #64

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: styling, avoid bracketless if statements
Brendan Le Foll [Mon, 15 Dec 2014 16:22:53 +0000 (16:22 +0000)]
gpio.c: styling, avoid bracketless if statements

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocontributing.md: Add developer certificate of origin stuff
Brendan Le Foll [Mon, 15 Dec 2014 16:22:16 +0000 (16:22 +0000)]
contributing.md: Add developer certificate of origin stuff

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: do not check return value of mraa_gpio_dir when used on muxes
Brendan Le Foll [Mon, 15 Dec 2014 11:47:21 +0000 (11:47 +0000)]
mraa.c: do not check return value of mraa_gpio_dir when used on muxes

Doing so breaks galileo gen2 (gpio2) and others. Failing early is rather
pointless in any case so we may as well attempt the write, muxes do not
neccesarily have directions that work

Fixes #68

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agox86/galileo-gen2: correct SPI MOSI mux info
Thomas Ingleby [Fri, 12 Dec 2014 20:41:00 +0000 (20:41 +0000)]
x86/galileo-gen2: correct SPI MOSI mux info

Fixes #67

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agox86/edison: only toggle tristate on physical pins
Thomas Ingleby [Fri, 12 Dec 2014 12:25:29 +0000 (12:25 +0000)]
x86/edison: only toggle tristate on physical pins

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodoc/spi: correct description of SPI
Thomas Ingleby [Thu, 11 Dec 2014 15:23:25 +0000 (15:23 +0000)]
doc/spi: correct description of SPI

SPI is not System Package Interface

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_edison_fab_c.c: ignore failed tristate writes when doing direction set
Brendan Le Foll [Thu, 11 Dec 2014 10:50:57 +0000 (10:50 +0000)]
intel_edison_fab_c.c: ignore failed tristate writes when doing direction set

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: fix error handling & leak in mraa_setup_mux_mapped
Brendan Le Foll [Wed, 10 Dec 2014 15:29:08 +0000 (15:29 +0000)]
mraa.c: fix error handling & leak in mraa_setup_mux_mapped

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobinding.gyp.cmake: fix architecture name for 32bit x86
Brendan Le Foll [Wed, 10 Dec 2014 14:52:23 +0000 (14:52 +0000)]
binding.gyp.cmake: fix architecture name for 32bit x86

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.i: remove comments breaking builds with SWIG 3.0.3
Brendan Le Foll [Wed, 10 Dec 2014 11:06:13 +0000 (11:06 +0000)]
mraa.i: remove comments breaking builds with SWIG 3.0.3

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobinding.gyp.cmake: define *PLAT based on target_platform
Brendan Le Foll [Tue, 9 Dec 2014 18:38:54 +0000 (18:38 +0000)]
binding.gyp.cmake: define *PLAT based on target_platform

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: check already initialised before anything else in mraa_init
Brendan Le Foll [Tue, 9 Dec 2014 18:31:20 +0000 (18:31 +0000)]
mraa.c: check already initialised before anything else in mraa_init

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoraspberry pi: correct bus definitions
Thomas Ingleby [Tue, 9 Dec 2014 18:18:46 +0000 (18:18 +0000)]
raspberry pi: correct bus definitions

They needed offsetting by +1, due to starting the config at 1 instead of
0 as it was during development

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: add Raspberry Pi ref to docs/index.md
Thomas Ingleby [Mon, 8 Dec 2014 16:05:28 +0000 (16:05 +0000)]
docs: add Raspberry Pi ref to docs/index.md

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoraspberry pi: add doc for model b
Thomas Ingleby [Fri, 21 Nov 2014 16:44:56 +0000 (16:44 +0000)]
raspberry pi: add doc for model b

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoarm: use raspberry pi platform
Thomas Ingleby [Fri, 21 Nov 2014 02:04:08 +0000 (02:04 +0000)]
arm: use raspberry pi platform

As it is the only currently supported ARM platform. It defaults to RPi

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoraspberry pi: add model b definition
Thomas Ingleby [Fri, 21 Nov 2014 01:47:16 +0000 (01:47 +0000)]
raspberry pi: add model b definition

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoarm: add initial skeleton for arm platform support
Thomas Ingleby [Fri, 21 Nov 2014 00:35:57 +0000 (00:35 +0000)]
arm: add initial skeleton for arm platform support

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agox86: move x86 platform include files into own directory
Thomas Ingleby [Fri, 21 Nov 2014 00:07:33 +0000 (00:07 +0000)]
x86: move x86 platform include files into own directory

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoarch: initial framework for supporting other architectures added.
Thomas Ingleby [Fri, 21 Nov 2014 00:01:08 +0000 (00:01 +0000)]
arch: initial framework for supporting other architectures added.

x86: all platforms moved into x86 directory

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_edison_fab_c.c: fix typo in function name
Brendan Le Foll [Mon, 8 Dec 2014 13:35:43 +0000 (13:35 +0000)]
intel_edison_fab_c.c: fix typo in function name

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_minnow_max.c: fix unsafe strncpy not NULL terminating
Brendan Le Foll [Mon, 8 Dec 2014 12:03:24 +0000 (12:03 +0000)]
intel_minnow_max.c: fix unsafe strncpy not NULL terminating

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_galileo_rev_g.c: add more robust error handling
Brendan Le Foll [Mon, 8 Dec 2014 11:35:54 +0000 (11:35 +0000)]
intel_galileo_rev_g.c: add more robust error handling

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_galileo_rev_d.c: check malloc return values
Brendan Le Foll [Mon, 8 Dec 2014 11:35:15 +0000 (11:35 +0000)]
intel_galileo_rev_d.c: check malloc return values

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_galileo_rev_d.c: prefix syslog calls
Brendan Le Foll [Mon, 8 Dec 2014 11:34:47 +0000 (11:34 +0000)]
intel_galileo_rev_d.c: prefix syslog calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_minnow_max.c: check malloc return values
Brendan Le Foll [Mon, 8 Dec 2014 11:33:15 +0000 (11:33 +0000)]
intel_minnow_max.c: check malloc return values

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_de3815.c: check malloc return values
Brendan Le Foll [Mon, 8 Dec 2014 11:32:54 +0000 (11:32 +0000)]
intel_de3815.c: check malloc return values

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_edison_fab_c.c: add more robust error handling
Brendan Le Foll [Mon, 8 Dec 2014 11:31:52 +0000 (11:31 +0000)]
intel_edison_fab_c.c: add more robust error handling

Fixes #55

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio.c: properly cleanup after mraa_aio_close
Kurt Eckhardt [Sat, 6 Dec 2014 15:58:00 +0000 (07:58 -0800)]
aio.c: properly cleanup after mraa_aio_close

Problem not closing file handle when you destroy the mraa_aio_context

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.i: add enum item rename rule
Brendan Le Foll [Tue, 2 Dec 2014 23:20:24 +0000 (23:20 +0000)]
mraa.i: add enum item rename rule

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocommon.h: move functions from types.h
Brendan Le Foll [Tue, 2 Dec 2014 23:19:54 +0000 (23:19 +0000)]
common.h: move functions from types.h

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agotypes.h: Move mraa_pinmodes_t to types.h
Brendan Le Foll [Tue, 2 Dec 2014 23:18:20 +0000 (23:18 +0000)]
types.h: Move mraa_pinmodes_t to types.h

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCMakeLists.txt: use relative paths for install
Brendan Le Foll [Tue, 2 Dec 2014 17:49:48 +0000 (17:49 +0000)]
CMakeLists.txt: use relative paths for install

Using CMAKE_INSTALL_FULL_LIBDIR breaks cpack

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocmake: Define library suffix in case of 64 bits multilib archs in linux
Helio Chissini de Castro [Mon, 1 Dec 2014 12:12:50 +0000 (10:12 -0200)]
cmake: Define library suffix in case of 64 bits multilib archs in linux

Signed-off-by: Helio Chisisni de Castro <helio@kde.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa: update to version 0.5.4 v0.5.4
Brendan Le Foll [Tue, 2 Dec 2014 11:01:23 +0000 (11:01 +0000)]
mraa: update to version 0.5.4

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm.c: Fix error in mraa_pwm_read_duty
Brendan Le Foll [Tue, 2 Dec 2014 10:50:17 +0000 (10:50 +0000)]
pwm.c: Fix error in mraa_pwm_read_duty

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm.c: Fix error in mraa_pwm_read_period
Brendan Le Foll [Tue, 2 Dec 2014 10:37:44 +0000 (10:37 +0000)]
pwm.c: Fix error in mraa_pwm_read_period

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopackage.json.cmake: Proper version requires for nodejs
Helio Chissini de Castro [Mon, 1 Dec 2014 12:14:29 +0000 (10:14 -0200)]
package.json.cmake: Proper version requires for nodejs

Signed-off-by: Helio Chissini de Castro <helio@kde.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopackage.json.cmake: fix broken main property
Brendan Le Foll [Mon, 1 Dec 2014 14:40:59 +0000 (14:40 +0000)]
package.json.cmake: fix broken main property

This is a partial revert of previous commit

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agonpmpkg: Fix package.json having invalid main property
Brendan Le Foll [Mon, 1 Dec 2014 13:59:47 +0000 (13:59 +0000)]
npmpkg: Fix package.json having invalid main property

Fixes #48

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodoxy2swig: quick fix on missing unicode encode
Mihai Tudor Panu [Wed, 26 Nov 2014 22:56:10 +0000 (14:56 -0800)]
doxy2swig: quick fix on missing unicode encode

Signed-off-by: Mihai Tudor Panu <mihai.t.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples: use mraa_get_platform_name API in examples
Brendan Le Foll [Thu, 27 Nov 2014 09:37:52 +0000 (09:37 +0000)]
examples: use mraa_get_platform_name API in examples

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa: update to version 0.5.3 v0.5.3
Thomas Ingleby [Wed, 26 Nov 2014 15:29:29 +0000 (15:29 +0000)]
mraa: update to version 0.5.3

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agomraa: add mraa_get_platform_name
Thomas Ingleby [Wed, 26 Nov 2014 15:15:55 +0000 (15:15 +0000)]
mraa: add mraa_get_platform_name

getPlatformName for c++/swig API
Closes #35

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm.c: remove possibility of division by 0
Brendan Le Foll [Wed, 26 Nov 2014 14:00:17 +0000 (14:00 +0000)]
pwm.c: remove possibility of division by 0

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm.c: check error condition when doing read operations
Brendan Le Foll [Wed, 26 Nov 2014 13:59:59 +0000 (13:59 +0000)]
pwm.c: check error condition when doing read operations

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_de3815.c: make sure strncpy() doesn't go over 8 chars
Brendan Le Foll [Wed, 26 Nov 2014 13:59:01 +0000 (13:59 +0000)]
intel_de3815.c: make sure strncpy() doesn't go over 8 chars

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: cast return value explicitly
Brendan Le Foll [Wed, 26 Nov 2014 13:58:28 +0000 (13:58 +0000)]
gpio.c: cast return value explicitly

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: fail early in case of error when reading file
Brendan Le Foll [Wed, 26 Nov 2014 13:56:27 +0000 (13:56 +0000)]
gpio.c: fail early in case of error when reading file

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: check return status of open call
Brendan Le Foll [Wed, 26 Nov 2014 13:56:10 +0000 (13:56 +0000)]
gpio.c: check return status of open call

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio.c: check aio_get_valid_fp return value
Brendan Le Foll [Wed, 26 Nov 2014 13:30:10 +0000 (13:30 +0000)]
aio.c: check aio_get_valid_fp return value

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio.c: remove less-than-zero comparison of an unsigned var
Brendan Le Foll [Tue, 25 Nov 2014 13:32:05 +0000 (13:32 +0000)]
aio.c: remove less-than-zero comparison of an unsigned var

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: fix incorrect debug message due to merge
Brendan Le Foll [Tue, 25 Nov 2014 13:30:30 +0000 (13:30 +0000)]
gpio.c: fix incorrect debug message due to merge

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa_board_t: fix operator in *_mmap_unsetup
Brendan Le Foll [Tue, 25 Nov 2014 13:27:17 +0000 (13:27 +0000)]
mraa_board_t: fix operator in *_mmap_unsetup

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: update documentation mistakes
Brendan Le Foll [Tue, 25 Nov 2014 13:26:17 +0000 (13:26 +0000)]
docs: update documentation mistakes

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c.c: fix typo in mraa_i2c_read_word_data
Brendan Le Foll [Wed, 26 Nov 2014 07:52:40 +0000 (07:52 +0000)]
i2c.c: fix typo in mraa_i2c_read_word_data

Fixes #45

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agohello_isr.py: add counter to example
Brendan Le Foll [Tue, 25 Nov 2014 10:37:36 +0000 (10:37 +0000)]
hello_isr.py: add counter to example

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocmake: fix indentation
Brendan Le Foll [Mon, 24 Nov 2014 18:03:36 +0000 (18:03 +0000)]
cmake: fix indentation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopackage.json.cmake: remove repository tag causing issues on update
Brendan Le Foll [Mon, 24 Nov 2014 17:45:50 +0000 (17:45 +0000)]
package.json.cmake: remove repository tag causing issues on update

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agonpm: add node-gyp build support
Brendan Le Foll [Mon, 24 Nov 2014 15:18:53 +0000 (15:18 +0000)]
npm: add node-gyp build support

This commit adds all the infrastructure necessary for doing node-gyp builds of
mraa. Note this will only build the mraa js bindings and will dirty your git
tree whilst doing it. It also assumes the user does not have SWIG installed on
their machines and so the swig wrapper is static. The target to use this
feature is 'npmpkg'.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agojavascript: add a generated package.json with versioning
Brendan Le Foll [Mon, 24 Nov 2014 11:19:05 +0000 (11:19 +0000)]
javascript: add a generated package.json with versioning

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: update product names & brand names
Brendan Le Foll [Mon, 24 Nov 2014 10:51:27 +0000 (10:51 +0000)]
docs: update product names & brand names

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: add minnowboard max to doxygen index page
Brendan Le Foll [Mon, 24 Nov 2014 10:50:32 +0000 (10:50 +0000)]
docs: add minnowboard max to doxygen index page

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c.h: fix typo in doxygen comment
Brendan Le Foll [Mon, 24 Nov 2014 08:04:08 +0000 (08:04 +0000)]
i2c.h: fix typo in doxygen comment

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: Added gpio list/set/get utility
Henry Bruce [Fri, 21 Nov 2014 01:15:44 +0000 (17:15 -0800)]
gpio.c: Added gpio list/set/get utility

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: Added first cut at minnow-max documentation
Henry Bruce [Fri, 21 Nov 2014 01:14:48 +0000 (17:14 -0800)]
docs: Added first cut at minnow-max documentation

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_minnow_max.c: fixed pin capability errors
Henry Bruce [Fri, 21 Nov 2014 01:13:58 +0000 (17:13 -0800)]
intel_minnow_max.c: fixed pin capability errors

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: explain aio numbering scheme
Brendan Le Foll [Fri, 21 Nov 2014 11:58:08 +0000 (11:58 +0000)]
docs: explain aio numbering scheme

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: fix mistake from mem branch where spi will fail.
Thomas Ingleby [Fri, 21 Nov 2014 02:05:43 +0000 (02:05 +0000)]
spi: fix mistake from mem branch where spi will fail.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agomraa.c: fix char count in board_name
Brendan Le Foll [Thu, 20 Nov 2014 15:00:55 +0000 (15:00 +0000)]
mraa.c: fix char count in board_name

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agooe-sdk_cross.cmake: 'make install' now targets oe sysroot
Henry Bruce [Thu, 20 Nov 2014 01:01:35 +0000 (17:01 -0800)]
oe-sdk_cross.cmake: 'make install' now targets oe sysroot

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm.c: Must write period before duty_cycle to avoid sysfs error
Henry Bruce [Thu, 20 Nov 2014 00:55:48 +0000 (16:55 -0800)]
pwm.c: Must write period before duty_cycle to avoid sysfs error

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agoblink_onboard.c: Added Minnow Max support
Henry Bruce [Sat, 15 Nov 2014 00:33:38 +0000 (16:33 -0800)]
blink_onboard.c: Added Minnow Max support

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agohellomraa.c: Extended sample to display detected platform.
Henry Bruce [Thu, 13 Nov 2014 22:00:03 +0000 (14:00 -0800)]
hellomraa.c: Extended sample to display detected platform.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agogpio.c: check that real gpio did initialise correctly
Henry Bruce [Sat, 15 Nov 2014 00:32:55 +0000 (16:32 -0800)]
gpio.c: check that real gpio did initialise correctly

On platforms without muxing perform a little more checking when the 'real'
linux/sysfs gpio is opened. We don't expect this to fail but on platforms where
the linux gpios can be changed depending on pinctrl/bios configuration this
might not always be the case.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_minnow_max: Added platform definition
Henry Bruce [Thu, 13 Nov 2014 21:55:58 +0000 (13:55 -0800)]
intel_minnow_max: Added platform definition

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogalileo gen2: add missing mux information for UART on IO1
Thomas Ingleby [Thu, 20 Nov 2014 14:59:34 +0000 (14:59 +0000)]
galileo gen2: add missing mux information for UART on IO1

Fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_edison_fab_c.c: remove uart_init_post hook for miniboard
Brendan Le Foll [Thu, 20 Nov 2014 14:23:29 +0000 (14:23 +0000)]
intel_edison_fab_c.c: remove uart_init_post hook for miniboard

use uart_init_pre hook instead. Fixes #39

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoi2c: fix I2c::read() call
Brendan Le Foll [Thu, 20 Nov 2014 14:10:56 +0000 (14:10 +0000)]
i2c: fix I2c::read() call

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: remove smbus helper library & clean up command use in API
Brendan Le Foll [Tue, 18 Nov 2014 16:09:08 +0000 (16:09 +0000)]
i2c: remove smbus helper library & clean up command use in API

This commit changes the mraa_i2c_read() API call behaviour, a register should
now always be set when using this call. The smbus helper library is no longer
required since the code is now all contained from i2c.c which avoids multiple
function calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.hpp: remove transfer command from SWIG APIs
Brendan Le Foll [Tue, 18 Nov 2014 15:57:47 +0000 (15:57 +0000)]
spi.hpp: remove transfer command from SWIG APIs

Transfer command works with a uint8_t buffer that is written into, this does
not work in SWIG APIs and will cause a copy in either case, so the API call is
not useful. Remove to stop confusion.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocommon.hpp: add missing docstring param for setLogLevel
Brendan Le Foll [Tue, 18 Nov 2014 15:56:33 +0000 (15:56 +0000)]
common.hpp: add missing docstring param for setLogLevel

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: add clean {write, read}data functions
Brendan Le Foll [Mon, 17 Nov 2014 16:23:49 +0000 (16:23 +0000)]
i2c: add clean {write, read}data functions

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