Private
Public Access
2
0
Commit Graph

727 Commits

Author SHA1 Message Date
Brendan Le Foll
4d36d24a70 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>
2015-04-07 23:52:43 +01:00
Brendan Le Foll
4599f3c12a tests: add cmake ctest infrastructure so make test can run
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-07 23:52:39 +01:00
Costin Constantin
8cc957ac64 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>
2015-04-07 23:42:58 +01:00
Brendan Le Foll
784ee58b26 building.md: add python3 & buildarch info
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-04 19:04:05 +01:00
Michael Ring
5dfd8e43df 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>
2015-04-04 17:53:20 +01:00
Michael Ring
d9d55e42bc 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>
2015-04-04 17:29:24 +01:00
Michael Ring
d0c466e81c 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>
2015-04-04 17:29:24 +01:00
Brendan Le Foll
5fa47dd4ab gpio.hpp: fix typo in docstring for isr
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-03 21:42:31 +01:00
Brendan Le Foll
2138802b59 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>
2015-04-03 21:42:31 +01:00
Brendan Le Foll
6aa601cd1d 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>
2015-04-02 14:01:06 +01:00
Brendan Le Foll
c397fef4a1 building.md: add graphviz to our deps
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-02 13:54:38 +01:00
Brendan Le Foll
eb894033c5 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>
2015-04-02 13:51:00 +01:00
Brendan Le Foll
8ad5064ce2 buidling.md: fix missing D in BUILDOC define
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-04-02 13:38:39 +01:00
Thomas Ingleby
874d69e9e5 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>
2015-03-31 16:34:41 +01:00
Henry Bruce
a1c5bd8742 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>
2015-03-31 13:56:29 +01:00
Henry Bruce
2b8b28171b 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>
2015-03-31 13:56:29 +01:00
Brendan Le Foll
1b6af99c5a building.md: clarify build reqs for building and add node 0.12
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-29 15:45:36 +01:00
Thomas Ingleby
8f239579a4 docs/building: add doxygen information
Also Sphinx version

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-03-27 16:33:20 +00:00
Thomas Ingleby
be4312e506 pwm: add syslog warning when value greater than 100% used
Resolves #121

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-03-24 16:51:56 +00:00
Thomas Ingleby
64f962d15c pwm: add calls for getting PWM max and min period
Resolves #176

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2015-03-24 16:48:06 +00:00
Thomas Ingleby
52c53760b2 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>
2015-03-23 17:25:27 +00:00
Thomas Ingleby
2388fb9a2a 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>
2015-03-23 17:07:54 +00:00
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