contrib/mraa.git
9 years agotesting.md: add testing doc
Brendan Le Foll [Tue, 7 Apr 2015 22:32:47 +0000 (23:32 +0100)]
testing.md: add testing doc

Doc is partly from Costin's original README and include details on the ctest
infrastructure and how to use

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agotests: add cmake ctest infrastructure so `make test` can run
Brendan Le Foll [Tue, 7 Apr 2015 22:38:48 +0000 (23:38 +0100)]
tests: add cmake ctest infrastructure so `make test` can run

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agotests: add python test cases suite
Costin Constantin [Tue, 7 Apr 2015 14:02:27 +0000 (17:02 +0300)]
tests: add python test cases suite

Currently only galileo is supported. This commit removes the old GTEST stuff
and mraa_test.cxx which never did much

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobuilding.md: add python3 & buildarch info
Brendan Le Foll [Sat, 4 Apr 2015 18:04:05 +0000 (19:04 +0100)]
building.md: add python3 & buildarch info

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/mraa-gpio.c: Fixed compiler warning due to missing include
Michael Ring [Tue, 31 Mar 2015 20:36:37 +0000 (22:36 +0200)]
examples/mraa-gpio.c: Fixed compiler warning due to missing include

Warning fixed is atoi not being defined when building on Fedora 22

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobeaglebone.h: added Beaglebone Black Platform
Michael Ring [Sat, 21 Feb 2015 15:30:09 +0000 (16:30 +0100)]
beaglebone.h: added Beaglebone Black Platform

src/arm/CMakeLists.txt added beaglebone.c as a dependency src/arm/arm.c added
initialization of beaglebone black platform src/arm/beaglebone.c mraa support
for the Beaglebone Black Rev B+C includes support for mmap access to gpio

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa_adv_func.h: Added pwm initialization replace
Michael Ring [Sat, 21 Feb 2015 15:27:13 +0000 (16:27 +0100)]
mraa_adv_func.h: Added pwm initialization replace

current code in pwm does not work for beaglebone src/pwm/pwm.c Implemented
check for pwm_init_replace

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.hpp: fix typo in docstring for isr
Brendan Le Foll [Fri, 3 Apr 2015 20:40:44 +0000 (21:40 +0100)]
gpio.hpp: fix typo in docstring for isr

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: Improve python docs
Brendan Le Foll [Fri, 3 Apr 2015 18:41:52 +0000 (19:41 +0100)]
docs: Improve python docs

This commit adds a bunch of includes from the C/C++ doxygen doc into the
sphinx/python doc to make it more useful. It also splits out the doc of the
classes using autoclass instead of autodoc to make it nicer to navigate.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agojavascript/CMakeLists.txt: stop requiring doc_i files for node.js
Brendan Le Foll [Thu, 2 Apr 2015 13:01:05 +0000 (14:01 +0100)]
javascript/CMakeLists.txt: stop requiring doc_i files for node.js

These files are required when building docs for python but are never used for
the node.js module

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobuilding.md: add graphviz to our deps
Brendan Le Foll [Thu, 2 Apr 2015 12:54:38 +0000 (13:54 +0100)]
building.md: add graphviz to our deps

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.i: add idef for SWIGPYTHON on doc interface files
Brendan Le Foll [Thu, 2 Apr 2015 12:50:59 +0000 (13:50 +0100)]
mraa.i: add idef for SWIGPYTHON on doc interface files

This fixes compilation of node.js module with doxygen

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobuidling.md: fix missing D in BUILDOC define
Brendan Le Foll [Thu, 2 Apr 2015 12:38:29 +0000 (13:38 +0100)]
buidling.md: fix missing D in BUILDOC define

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCmake: add override BUILDARCH for selecting arch
Thomas Ingleby [Tue, 31 Mar 2015 15:34:41 +0000 (16:34 +0100)]
Cmake: add override BUILDARCH for selecting arch

Stops TargetArch module for running and finding the arch

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoCMakeLists.txt: Added option to install mraa-gpio tool
Henry Bruce [Tue, 31 Mar 2015 12:54:10 +0000 (13:54 +0100)]
CMakeLists.txt: Added option to install mraa-gpio tool

This commit renames gpio.c to mraa-gpio.c to make installation in bin/ less
annoying

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCMakeLists.txt: Set correct package architecture for deb and ipk.
Henry Bruce [Wed, 11 Mar 2015 19:43:47 +0000 (12:43 -0700)]
CMakeLists.txt: Set correct package architecture for deb and ipk.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobuilding.md: clarify build reqs for building and add node 0.12
Brendan Le Foll [Sun, 29 Mar 2015 14:45:36 +0000 (15:45 +0100)]
building.md: clarify build reqs for building and add node 0.12

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs/building: add doxygen information
Thomas Ingleby [Fri, 27 Mar 2015 16:30:25 +0000 (16:30 +0000)]
docs/building: add doxygen information

Also Sphinx version

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm: add syslog warning when value greater than 100% used
Thomas Ingleby [Tue, 24 Mar 2015 16:51:56 +0000 (16:51 +0000)]
pwm: add syslog warning when value greater than 100% used

Resolves #121

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm: add calls for getting PWM max and min period
Thomas Ingleby [Tue, 24 Mar 2015 16:48:06 +0000 (16:48 +0000)]
pwm: add calls for getting PWM max and min period

Resolves #176

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoapi: introduce define for pin name size
Thomas Ingleby [Mon, 23 Mar 2015 17:25:27 +0000 (17:25 +0000)]
api: introduce define for pin name size

MRAA_PIN_NAME_SIZE currently set at 12.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoswig/python: rename python-mraa.i to mraa.i
Thomas Ingleby [Mon, 23 Mar 2015 17:07:54 +0000 (17:07 +0000)]
swig/python: rename python-mraa.i to mraa.i

Seemed to be a problem when generating python swig module when using
cmake version 3.2.1

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoclang-format: run clang-format on C/C++ code
Brendan Le Foll [Mon, 23 Mar 2015 14:39:12 +0000 (14:39 +0000)]
clang-format: run clang-format on C/C++ code

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopackage.json.cmake: use 0.10.x is the minimum version to compile
Brendan Le Foll [Thu, 19 Mar 2015 18:24:29 +0000 (18:24 +0000)]
package.json.cmake: use 0.10.x is the minimum version to compile

Note that if you compile a 0.12.x version it'll still have 0.10.x as a min req
but will likely not work with a 0.10.x interpreter

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobinding.gyp.cmake: get v8 version from node and export to c++ compiler
Brendan Le Foll [Thu, 19 Mar 2015 18:20:36 +0000 (18:20 +0000)]
binding.gyp.cmake: get v8 version from node and export to c++ compiler

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraajs.i: use SWIG_V8_VERSION from C++ preprocessor not swig
Brendan Le Foll [Thu, 19 Mar 2015 18:18:35 +0000 (18:18 +0000)]
mraajs.i: use SWIG_V8_VERSION from C++ preprocessor not swig

SWIG's preprocessor will not handle the SWIG_V8_VERSION these will go in the
wrapper code so that someone compiling with npm will use his version of node

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agonpm.md: add npm node-gyp build instructions
Brendan Le Foll [Thu, 19 Mar 2015 18:16:27 +0000 (18:16 +0000)]
npm.md: add npm node-gyp build instructions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopackage.json.cmake: create node version specific package.json
Brendan Le Foll [Thu, 19 Mar 2015 11:54:58 +0000 (11:54 +0000)]
package.json.cmake: create node version specific package.json

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agosrc/CMakeLists.txt: warn if swig is less than 3.0.5
Brendan Le Foll [Thu, 19 Mar 2015 11:31:51 +0000 (11:31 +0000)]
src/CMakeLists.txt: warn if swig is less than 3.0.5

The SWIG js module cannot build on SWIG 2.x, it also now requires macros
defined in SWIG 3.0.4 and above but there are python issues in everything
3.0.2-3.0.4 so we force a requirement on 3.0.5 and above

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCMakeLists.txt: add REQUIRED to threading find_package
Brendan Le Foll [Thu, 19 Mar 2015 11:31:20 +0000 (11:31 +0000)]
CMakeLists.txt: add REQUIRED to threading find_package

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agonodejs: add infra to detect nodejs version
Brendan Le Foll [Wed, 18 Mar 2015 12:20:54 +0000 (12:20 +0000)]
nodejs: add infra to detect nodejs version

This introduces FindNodes.cmake which finds the v8 version and the nodejs
interp version and passes the information to SWIG via SWIG_V8_VERSION

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraajs: update for node.js 0.12 API differences
Brendan Le Foll [Tue, 10 Mar 2015 14:53:09 +0000 (14:53 +0000)]
mraajs: update for node.js 0.12 API differences

This requires setting #define SWIG_V8_VERSION 0x032873 in the
mraajsJAVASCRIPT_wrap.cxx file. Note most v8 APIs now require v8::Isolate and
v8::Persistent is no longer a v8::Handle so the gpio.hpp for ISR support is
also modified by this change

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocommon: fix documentation string on mraa_init
Brendan Le Foll [Thu, 19 Mar 2015 09:29:41 +0000 (09:29 +0000)]
common: fix documentation string on mraa_init

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio: Re-implemented the display of pin names
Michael Ring [Wed, 18 Mar 2015 19:48:14 +0000 (20:48 +0100)]
examples/gpio: Re-implemented the display of pin names

Re-introduced AIO Pins

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointernal/pin/name: increase length of pin name
Michael Ring [Wed, 18 Mar 2015 19:48:14 +0000 (20:48 +0100)]
internal/pin/name: increase length of pin name

From 8 to 12 array size

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoapi/mraa: add mraa_get_pin_name
Michael Ring [Wed, 18 Mar 2015 19:48:14 +0000 (20:48 +0100)]
api/mraa: add mraa_get_pin_name

Add mraa_get_pin_name to get the real world name of the pin.

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopython: build with python 2.7 in the correct python site dir
Kevron Rees [Sun, 1 Mar 2015 02:08:50 +0000 (18:08 -0800)]
python: build with python 2.7 in the correct python site dir

This commit also introduces BUILDPYTHON3 option, by default mraa will look for
a python 2 installation

Signed-off-by: Kevron Rees <tripzero.kev@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCPack IPK: remove maa replace reference
Thomas Ingleby [Sun, 15 Mar 2015 18:51:23 +0000 (18:51 +0000)]
CPack IPK: remove maa replace reference

It seems way past time to now remove the reference to the old name

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_minnow_max.c: Add support for spi
Brendan Le Foll [Fri, 13 Mar 2015 16:29:33 +0000 (16:29 +0000)]
intel_minnow_max.c: Add support for spi

This commit also adds a bit of documentation on the low speed spi kernel module
required

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: flip the msg flags for mraa_i2c_read_bytes_data
Brendan Le Foll [Fri, 13 Mar 2015 16:01:59 +0000 (16:01 +0000)]
i2c: flip the msg flags for mraa_i2c_read_bytes_data

Fixes 168.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c.hpp: Remove tab
Gabriel Smith [Tue, 3 Mar 2015 16:31:47 +0000 (16:31 +0000)]
i2c.hpp: Remove tab

Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: Add functions for bulk read from register
Gabriel Smith [Tue, 3 Mar 2015 16:26:19 +0000 (16:26 +0000)]
i2c: Add functions for bulk read from register

Functions issue a write command for the register to read from and then a read
command without a stop signal in between

Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: return int instead of uint8_t in mraa_spi_write
Brendan Le Foll [Tue, 3 Mar 2015 16:20:29 +0000 (16:20 +0000)]
spi: return int instead of uint8_t in mraa_spi_write

This stops the error code getting lost since -1 wraps around to 0xFF when cast
to a uint8_t. This fixes #146

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_edison_fab_c.c: let the edison spi driver select the correct method for CS
Brendan Le Foll [Tue, 3 Mar 2015 14:27:54 +0000 (14:27 +0000)]
intel_edison_fab_c.c: let the edison spi driver select the correct method for CS

Gpio 111 controls the use of hardware CS by the edison kernel's SPI driver.
This is an issue as that CS will go high between every byte transmitted. The
solution is to let gpio 111 alone and let the driver decide what is best. This
fixes #137

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoREADME.md: add -dev repository information
Brendan Le Foll [Sun, 1 Mar 2015 17:31:17 +0000 (17:31 +0000)]
README.md: add -dev repository information

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_edison_fab_c.c: Fix frequency setting on edison r2 images
Brendan Le Foll [Sun, 1 Mar 2015 17:15:19 +0000 (17:15 +0000)]
intel_edison_fab_c.c: Fix frequency setting on edison r2 images

This reworks the mraa_intel_edison_i2c_freq() function. i2c_dw_sysnode is a
folder not a file so we need to grab the mode file from that folder. We now
also support i2c-1 frequency changing

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoraspberry_pi.c: Wrong pin number used for Raspberry Pi in default case
Michael Ring [Sat, 21 Feb 2015 11:31:48 +0000 (12:31 +0100)]
raspberry_pi.c: Wrong pin number used for Raspberry Pi in default case

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: stop C constructor calling mraa_init() in SWIG builds
Brendan Le Foll [Sun, 1 Mar 2015 10:22:13 +0000 (10:22 +0000)]
mraa.c: stop C constructor calling mraa_init() in SWIG builds

Closes #65

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agox86.c: unknown init now returns MRAA_UNKNOWN_PLATFORM
Brendan Le Foll [Sun, 1 Mar 2015 10:12:04 +0000 (10:12 +0000)]
x86.c: unknown init now returns MRAA_UNKNOWN_PLATFORM

This stops the legacy beahviour that was to initialise as a gen1 galileo if we
failed to find a valid dmi name. Closes #142

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.h: fix docstring style
Brendan Le Foll [Fri, 27 Feb 2015 16:53:16 +0000 (16:53 +0000)]
spi.h: fix docstring style

Function doc should not start on comment start line since every other header
doesn't do it

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocontributing.md: amend project contribution goals
Brendan Le Foll [Fri, 27 Feb 2015 16:51:26 +0000 (16:51 +0000)]
contributing.md: amend project contribution goals

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison.md: add some SPI limitations
Brendan Le Foll [Fri, 27 Feb 2015 16:50:55 +0000 (16:50 +0000)]
edison.md: add some SPI limitations

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: styling & docstring fix
Brendan Le Foll [Fri, 27 Feb 2015 16:17:00 +0000 (16:17 +0000)]
spi: styling & docstring fix

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.c: change spi mode to a uint32_t
Brendan Le Foll [Fri, 27 Feb 2015 16:14:19 +0000 (16:14 +0000)]
spi.c: change spi mode to a uint32_t

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa: update to API version 0.6.1 v0.6.1
Brendan Le Foll [Thu, 26 Feb 2015 09:39:24 +0000 (09:39 +0000)]
mraa: update to API version 0.6.1

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopython-mraa.i: ValueError when expecting bytearray but dont get it
Brendan Le Foll [Wed, 25 Feb 2015 19:23:25 +0000 (19:23 +0000)]
python-mraa.i: ValueError when expecting bytearray but dont get it

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c_HM5883.py: remove old python example
Brendan Le Foll [Wed, 25 Feb 2015 16:01:11 +0000 (16:01 +0000)]
i2c_HM5883.py: remove old python example

Example was using old string based read API which is deprecated in python and
gives confusing advice, there are enough python i2c examples so removing this
one

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocommon: add C++ init() call and explain reason to call again
Brendan Le Foll [Wed, 25 Feb 2015 15:43:38 +0000 (15:43 +0000)]
common: add C++ init() call and explain reason to call again

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples: add uart examples for js & py
Brendan Le Foll [Fri, 20 Feb 2015 15:02:46 +0000 (15:02 +0000)]
examples: add uart examples for js & py

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: change check to allow fd 0
Jon Trulson [Fri, 20 Feb 2015 13:36:42 +0000 (13:36 +0000)]
gpio.c: change check to allow fd 0

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: check fd before attempting to use it
Jon Trulson [Fri, 20 Feb 2015 13:35:26 +0000 (13:35 +0000)]
gpio.c: check fd before attempting to use it

mraa_gpio_wait_interrupt needs to check fd before using it

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agouart.c: mraa_uart_get_dev_path return NULL on error
Jon Trulson [Wed, 18 Feb 2015 19:38:44 +0000 (12:38 -0700)]
uart.c: mraa_uart_get_dev_path return NULL on error

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoisr.js: add node.js isr example
Brendan Le Foll [Wed, 18 Feb 2015 14:30:22 +0000 (14:30 +0000)]
isr.js: add node.js isr example

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agonodejs: Add isr support to node.js
Brendan Le Foll [Wed, 18 Feb 2015 14:27:50 +0000 (14:27 +0000)]
nodejs: Add isr support to node.js

This commit adds isr support to node.js mraa module, it also forces
SWIGJAVASCRIPT to be set at compile time by cmake (SWIG uses SWIGJAVASCRIPT and
not SWIGNODE in it's preprocessor). This uses libuv uv_queue_work to call v8isr
and is all done at a C++ level unlike the python isr, so this reuses the
mraa_gpio_isr call. This closes #110

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/spi_max7219.c: Example for 16bit wide convenience functions
Michael Ring [Sat, 14 Feb 2015 17:51:56 +0000 (18:51 +0100)]
examples/spi_max7219.c: Example for 16bit wide convenience functions

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.hpp: Fix indentation of comment
Michael Ring [Tue, 17 Feb 2015 15:34:27 +0000 (15:34 +0000)]
spi.hpp: Fix indentation of comment

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: Add 16bit wide convenience functions for spi
Michael Ring [Tue, 17 Feb 2015 15:34:01 +0000 (15:34 +0000)]
spi: Add 16bit wide convenience functions for spi

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.c: Initialization of spi is necessary on Beaglebone Black
Michael Ring [Sat, 14 Feb 2015 17:14:55 +0000 (18:14 +0100)]
spi.c: Initialization of spi is necessary on Beaglebone Black

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs/galileorevd.md: add doc for pin13 on gen1
Brendan Le Foll [Tue, 17 Feb 2015 14:40:06 +0000 (14:40 +0000)]
docs/galileorevd.md: add doc for pin13 on gen1

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa: update to API version 0.6.0
Brendan Le Foll [Wed, 11 Feb 2015 10:40:16 +0000 (10:40 +0000)]
mraa: update to API version 0.6.0

Note that v0.6.0 is in the branch with the same name, so this commit is not
0.6.0

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoraspberry_pi.md: Update docs to reflect latest rpi changes
Brendan Le Foll [Sun, 15 Feb 2015 22:57:24 +0000 (22:57 +0000)]
raspberry_pi.md: Update docs to reflect latest rpi changes

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoarm: added support for all models of Raspbery Pi A/B/A+/B+ & 2B
Michael Ring [Sun, 15 Feb 2015 11:55:15 +0000 (12:55 +0100)]
arm: added support for all models of Raspbery Pi A/B/A+/B+ & 2B

Includes SPI,I2C,GPIO and mmap access to GPIO. This commit removes the _b
suffix to the rpi board file

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoinclude/arm/raspberry_pi.h Added pincount defines for all supported devices
Michael Ring [Sun, 15 Feb 2015 11:51:45 +0000 (12:51 +0100)]
include/arm/raspberry_pi.h Added pincount defines for all supported devices

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoapi/mraa/types.h renamed enum for raspberry to make it more global
Michael Ring [Sun, 15 Feb 2015 11:50:37 +0000 (12:50 +0100)]
api/mraa/types.h renamed enum for raspberry to make it more global

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c added internal helper functions to support globbing and link analysis
Michael Ring [Sun, 15 Feb 2015 11:47:11 +0000 (12:47 +0100)]
mraa.c added internal helper functions to support globbing and link analysis

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoAdd options for nodejs include directory
yoneken [Tue, 10 Feb 2015 18:41:29 +0000 (03:41 +0900)]
Add options for nodejs include directory

Signed-off-by: Kenta Yonekura <yoneken@ieee.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio.c Added support for mmap access to gpio
Michael Ring [Sat, 14 Feb 2015 16:26:06 +0000 (17:26 +0100)]
examples/gpio.c Added support for mmap access to gpio

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio.c Added whitespace to better align gpio list output
Michael Ring [Sat, 14 Feb 2015 14:46:56 +0000 (15:46 +0100)]
examples/gpio.c Added whitespace to better align gpio list output

Signed-off-by: Michael Ring <mail@michael-ring.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio.c: Fix some formatting & code style
Brendan Le Foll [Tue, 10 Feb 2015 16:16:30 +0000 (16:16 +0000)]
examples/gpio.c: Fix some formatting & code style

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio.c: fix getchar() not working in ssh term
Brendan Le Foll [Tue, 10 Feb 2015 15:50:59 +0000 (15:50 +0000)]
examples/gpio.c: fix getchar() not working in ssh term

This is obviously not a nice way to do input handling but it avoids having more
code in the samples than is really needed

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: add DEBUG message for owner flag
Brendan Le Foll [Tue, 10 Feb 2015 15:39:45 +0000 (15:39 +0000)]
gpio.c: add DEBUG message for owner flag

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/gpio.c: Added command to monitor pin level changes using ISR
Henry Bruce [Thu, 5 Feb 2015 23:48:42 +0000 (15:48 -0800)]
examples/gpio.c: Added command to monitor pin level changes using ISR

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: fix spelling in comment
Henry Bruce [Tue, 10 Feb 2015 15:40:00 +0000 (15:40 +0000)]
gpio.c: fix spelling in comment

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: mraa_gpio_wait_interrupt() now waits for subsequent interrupts
Henry Bruce [Tue, 10 Feb 2015 15:39:21 +0000 (15:39 +0000)]
gpio.c: mraa_gpio_wait_interrupt() now waits for subsequent interrupts

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: fix some poor spelling & phrasing in docs
Brendan Le Foll [Mon, 9 Feb 2015 16:40:47 +0000 (16:40 +0000)]
docs: fix some poor spelling & phrasing in docs

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm.hpp: fix pin/chipid order in raw init
Brendan Le Foll [Mon, 9 Feb 2015 16:40:09 +0000 (16:40 +0000)]
pwm.hpp: fix pin/chipid order in raw init

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agosrc/mraa.c: mux mapped
Thomas Ingleby [Thu, 5 Feb 2015 16:20:09 +0000 (16:20 +0000)]
src/mraa.c: mux mapped

Don't own gpio of muxes, so it isnt unexported.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoRevert "setup_mux_mapped: use HIGH/LOW instead"
Brendan Le Foll [Thu, 5 Feb 2015 15:00:27 +0000 (15:00 +0000)]
Revert "setup_mux_mapped: use HIGH/LOW instead"

This reverts commit 6c73a8adceb2b59e1868dc57737be9b2ea51cec7 as it breaks
galileo gen1 muxing.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexamples/aio: Added examples for mraa_aio_read_float()/readFloat()
Alex Tereschenko [Wed, 4 Feb 2015 19:09:56 +0000 (20:09 +0100)]
examples/aio: Added examples for mraa_aio_read_float()/readFloat()

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio.c: added normalized read returning a float in a 0.0-1.0 range
Alex Tereschenko [Sun, 1 Feb 2015 19:54:13 +0000 (20:54 +0100)]
aio.c: added normalized read returning a float in a 0.0-1.0 range

Closes #32.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agominnow_max.md: work around bad rendering in GitHub
Tanu Kaskinen [Wed, 4 Feb 2015 13:44:51 +0000 (15:44 +0200)]
minnow_max.md: work around bad rendering in GitHub

If a line starts with '#', GitHub will show the line as a heading.
That may be a GitHub bug (I'm not sure what the Markdown spec says
about this), but anyway, let's rewrap the text so that GitHub shows
the text as intended.

Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa.c: Allow running mraa_init() as non root
Brendan Le Foll [Sat, 31 Jan 2015 09:26:24 +0000 (09:26 +0000)]
mraa.c: Allow running mraa_init() as non root

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: add pin number to export fail message
Brendan Le Foll [Wed, 28 Jan 2015 13:00:20 +0000 (13:00 +0000)]
gpio.c: add pin number to export fail message

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_minnow_max.c: define gpio.mux_total
Brendan Le Foll [Tue, 27 Jan 2015 14:11:59 +0000 (14:11 +0000)]
intel_minnow_max.c: define gpio.mux_total

Not defining this causes undefined behaviour leading to the check mux_total
sometimes being true and asking the kernel to export all sorts of garbage gpio

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agox86.c/mraa_x86_platform: added dedicated block for Galileo Gen1 init
Alex Tereschenko [Sun, 25 Jan 2015 18:52:40 +0000 (19:52 +0100)]
x86.c/mraa_x86_platform: added dedicated block for Galileo Gen1 init

Closes #99.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agomraa: we now log version and user ID into syslog upon init
Alex Tereschenko [Sun, 25 Jan 2015 14:38:48 +0000 (15:38 +0100)]
mraa: we now log version and user ID into syslog upon init

Closes #98.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agosetup_mux_mapped: use HIGH/LOW instead
Thomas Ingleby [Thu, 22 Jan 2015 17:36:16 +0000 (17:36 +0000)]
setup_mux_mapped: use HIGH/LOW instead

Avoids on some platforms where when setting a mux will set it low when
it wouldn't be safe to.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agogpio: add behaviour for pin without direction
Thomas Ingleby [Thu, 22 Jan 2015 17:33:46 +0000 (17:33 +0000)]
gpio: add behaviour for pin without direction

If a gpio doesnt have a direction, like some muxes do, try and set value
if HIGH or LOW was passed.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agocontributing.md: Fix typo
Petrus J.v.Rensburg [Wed, 21 Jan 2015 15:44:10 +0000 (17:44 +0200)]
contributing.md: Fix typo

Signed-off-by: Petrus J.v.Rensburg <petrus.jvrensburg@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoapi: remove internal strut from public API
Thomas Ingleby [Wed, 21 Jan 2015 16:33:00 +0000 (16:33 +0000)]
api: remove internal strut from public API

Moved for internal use only

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>