Private
Public Access
2
0
Commit Graph

705 Commits

Author SHA1 Message Date
Brendan Le Foll
ffcf3d7d07 clang-format: run clang-format on C/C++ code
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-23 15:15:48 +00:00
Brendan Le Foll
2174ee1673 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>
2015-03-19 18:26:06 +00:00
Brendan Le Foll
c1ac6f1928 binding.gyp.cmake: get v8 version from node and export to c++ compiler
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-19 18:26:06 +00:00
Brendan Le Foll
35d1dc10c7 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>
2015-03-19 18:26:06 +00:00
Brendan Le Foll
54a4a0bb1f npm.md: add npm node-gyp build instructions
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-19 18:26:06 +00:00
Brendan Le Foll
f0b3035337 package.json.cmake: create node version specific package.json
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-19 18:26:05 +00:00
Brendan Le Foll
406acb61b3 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>
2015-03-19 18:26:05 +00:00
Brendan Le Foll
812fc5e9c8 CMakeLists.txt: add REQUIRED to threading find_package
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-19 18:26:05 +00:00
Brendan Le Foll
128f0a22da 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>
2015-03-19 18:26:05 +00:00
Brendan Le Foll
824618ccf1 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>
2015-03-19 18:26:05 +00:00
Brendan Le Foll
e03eec3ce1 common: fix documentation string on mraa_init
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-19 09:30:25 +00:00
Michael Ring
8b0b9f1a79 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>
2015-03-19 00:19:50 +00:00
Michael Ring
0eda8cd397 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>
2015-03-19 00:18:41 +00:00
Michael Ring
827e1974bf 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>
2015-03-19 00:16:32 +00:00
Kevron Rees
62213fad77 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>
2015-03-18 10:30:17 +00:00
Thomas Ingleby
805d22f0b1 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>
2015-03-15 18:51:23 +00:00
Brendan Le Foll
c621fad5f3 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>
2015-03-13 16:29:36 +00:00
Brendan Le Foll
228b7b672d i2c: flip the msg flags for mraa_i2c_read_bytes_data
Fixes 168.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-13 16:02:04 +00:00
Gabriel Smith
0dd03950e4 i2c.hpp: Remove tab
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-03 16:31:47 +00:00
Gabriel Smith
caf1383325 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>
2015-03-03 16:26:57 +00:00
Brendan Le Foll
f854a2b410 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>
2015-03-03 16:20:30 +00:00
Brendan Le Foll
7375146295 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>
2015-03-03 14:29:21 +00:00
Brendan Le Foll
f33880c235 README.md: add -dev repository information
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-01 17:31:17 +00:00
Brendan Le Foll
677af126aa 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>
2015-03-01 17:17:53 +00:00
Michael Ring
2c74ba72a7 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>
2015-03-01 10:30:00 +00:00
Brendan Le Foll
76ffa35cec mraa.c: stop C constructor calling mraa_init() in SWIG builds
Closes #65

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-01 10:22:14 +00:00
Brendan Le Foll
10f450b3f6 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>
2015-03-01 10:12:06 +00:00
Brendan Le Foll
3b3b940000 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>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
415c369e15 contributing.md: amend project contribution goals
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
2755c571ff edison.md: add some SPI limitations
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
a747c80f63 spi: styling & docstring fix
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:17:04 +00:00
Brendan Le Foll
bd9eeb11ab spi.c: change spi mode to a uint32_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:14:19 +00:00
Brendan Le Foll
64f377cdfc mraa: update to API version 0.6.1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-26 09:39:48 +00:00
Brendan Le Foll
a2220e3636 python-mraa.i: ValueError when expecting bytearray but dont get it
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-25 19:23:25 +00:00
Brendan Le Foll
797b137826 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>
2015-02-25 16:01:36 +00:00
Brendan Le Foll
efdbf4b0a8 common: add C++ init() call and explain reason to call again
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-25 15:44:06 +00:00
Brendan Le Foll
163a40e6e7 examples: add uart examples for js & py
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-20 15:04:03 +00:00
Jon Trulson
9d80b12521 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>
2015-02-20 13:36:47 +00:00
Jon Trulson
ee05b49ea2 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>
2015-02-20 13:35:34 +00:00
Jon Trulson
dd807308ac 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>
2015-02-19 10:48:02 +00:00
Brendan Le Foll
d6891e8bd7 isr.js: add node.js isr example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-18 16:41:31 +00:00
Brendan Le Foll
008184c305 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>
2015-02-18 16:41:01 +00:00
Michael Ring
ffe40033d4 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>
2015-02-17 15:39:54 +00:00
Michael Ring
921e27ac22 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>
2015-02-17 15:39:54 +00:00
Michael Ring
55ac2e8996 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>
2015-02-17 15:39:54 +00:00
Michael Ring
3a5b992524 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>
2015-02-17 15:39:54 +00:00
Brendan Le Foll
78fe6f4270 docs/galileorevd.md: add doc for pin13 on gen1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-17 14:40:06 +00:00
Brendan Le Foll
cd36880f34 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>
2015-02-15 23:08:18 +00:00
Brendan Le Foll
989566bc04 raspberry_pi.md: Update docs to reflect latest rpi changes
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-15 22:57:24 +00:00
Michael Ring
3597d8a805 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>
2015-02-15 22:50:55 +00:00