Private
Public Access
2
0
Commit Graph

1095 Commits

Author SHA1 Message Date
Bernd Kuhls
7fce2e2a3a uart.c: fix build with musl libc
musl does not define CMSPAR on all archs, patch inspired by
http://git.alpinelinux.org/cgit/aports/plain/main/freerdp/musl-fix.patch

musl needs sys/select.h to provide fd_set.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-02-02 10:37:31 +00:00
Brendan Le Foll
44e705a518 java: Move mraajava.pc to java folder
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-02-02 10:05:57 +00:00
Henry Bruce
8ff42482ec nodejs: Fixed cmake bug in v8 and uv detection logic
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-28 14:21:30 +00:00
Henry Bruce
3924070171 nodejs: Updated FindNodejs.cmake so exported variables match package name
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-28 14:21:20 +00:00
Henry Bruce
ff31d6763c nodejs: cmake updates to more thoroughly check Node.js configuration
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-28 14:21:05 +00:00
Constantin Musca
ba5318fee9 intel_minnow_byt_compatible: include Turbot additions
The pinout for the Low Speed Expansion on the MinnowBoard
Turbot is the same as the MinnowBoard MAX A2 desgin, with
the exception of pin 26. Pin 26 was changed to provide an MCLK
reference clock for I2S.
In addition, the D2 LED is now under GPIO control.
Add support for these changes.

Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-25 15:49:53 +00:00
Eugene Bolshakov
2e5e3eaea2 mraajs: Check for CMAKE version > 3.1 or use workaround
Older cmake versions don't support the CXX_STANDARD property. Remove doubled
CMAKE_CXX_FLAGS in mraajs COMPILE_FLAGS

Closes #411

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-24 16:56:41 +00:00
Henry Bruce
078218f680 pwm: Check for out of range pin number in pwm_init()
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-22 15:06:47 +00:00
Stefan Andritoiu
c86fe2a12b java: Ignored function, which should not have bindings created for it
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-22 15:06:25 +00:00
Stefan Andritoiu
8b68f3040e java: added sanity checks for sample mapping and bindings
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Stefan Andritoiu
c564dad68f CMakelists: Made tests building rule independent of the python build
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Stefan Andritoiu
ecc04d7511 docs: Added reference to "Creating Java Bindings Guide"
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Petre Eftime
c63e38a57e java: Migrate IsrCallbacks to Java's Runnable class
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Brendan Le Foll
78a4d12a37 mraa.c: cache platform_name on mraa_init
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Brendan Le Foll
0aed0003ff mraa.c: make mraa_get_platform_name use a const char
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Brendan Le Foll
bdb5ef66e9 mraa.c: Add mraa_get_platform_version call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-21 15:28:03 +00:00
Constantin Musca
caebb8b1fb iio: guard pthread_setcancelstate with HAVE_PTHREAD_CANCEL
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-20 11:15:41 +00:00
Ian Johnson
ab14b9de43 mraa: Prefer calloc over malloc
Switch to using calloc on all calls to malloc where the memory isn't
initialized. For things like the mraa_board_t, not allocating all to zero
causes issues such as with the sub_platform member, where if that's not zero
mraa_get_platform_type will try to dereference a random memory location for the
sub_platform->platform_name, which can result in segmentation faults and other
issues.

Note that in some places where immediately after the malloc call is a copy
operation, there is no need for calloc, as all the memory gets overwritten
anyways, but in cases where there may or may not be memory written to (such as
in mraa_file_contains, with reading from a file), even though in most cases the
memory is overwritten, it could be the case that the read operation does
nothing, but the memory still has non-zero values, by virtue of the fact it
wasn't overwritten.

Signed-off-by: Ian Johnson <ijohnson@wolfram.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-20 08:20:28 +00:00
Bruce Beare
7e302242db x86.c: Add MinnowBoard Turbot initialization
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-13 14:03:23 +00:00
Brendan Le Foll
3483db363f i2c/LICENSE: Fix typo in roadnarrows url
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-13 13:28:59 +00:00
Brendan Le Foll
c2681dc78c binding.gyp.cmake: Fix npm builds for node 0.12.x
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-11 17:54:27 +00:00
Brendan Le Foll
6c0881848b Android.mk: Add missing src files to build file
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-07 16:19:47 +00:00
Brendan Le Foll
03d741ff3e intel_edison_fab_c.c: Change default i2c bus on miniboard from 6 to 1
Since on most 3rd party breakout boards the i2c bus exposed is 1 and not 6, it
makes more sense to have that as the default i2c bus

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 16:48:25 +00:00
Brendan Le Foll
0ebab9603e Blink-IO.js: Call the function after declaring it
This works ok if executing the whole file but the node.js interactive
interpreter gets confused when yoy copy and paste the code

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 16:37:15 +00:00
Pieterjan Camerlynck
a87a104efe CMakeLists.txt: do not require a C++ compiler
By default, CMake assumes both a C and C++ compiler are required.
This is not needed for mraa because it only provides C++ header
files. Note that if using SWIG you need one and if using node.js 3+ you'll need
a C++11 compiler

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:42:40 +00:00
Henry Bruce
6d391ce605 uart: Added stdlib.h to uart.hpp so malloc() and free() are declared
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:38:51 +00:00
Henry Bruce
63604ef5cc uart: Added timeout support for uart read
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:38:51 +00:00
Henry Bruce
a708e08101 examples/mraa-i2c: Fixed physical bus id error in list command
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:38:51 +00:00
Henry Bruce
8c40842e4b ftdi_ft4222: Re-order pin numbering and support i2c switch
First four pins (0 to 3) are now built-in FTDI GPIO/I2C pins
If i2c GPIO expander is detected, next 8 pins (4 to 11) are its GPIO
If i2c switch is detected an extra 4 i2c busses are added

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:38:51 +00:00
Henry Bruce
ed0124cc70 mraa_adv_func: Updated signature of gpio_init_internal_replace()
mraa_adv_func_t->gpio_init_internal_replace() now has mraa_gpio_context
parameter so that override function can access both physical and logical
pin numbers.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:38:51 +00:00
Samuel Martin
86a0e10c03 cmake: build shared libs by default on linux
The change allows to build shared libraries by default on Linux, while
respecting the requested library build type when the standard CMake flag
BUILD_SHARED_LIBS is defined.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:18:19 +00:00
Brendan Le Foll
7f85f2bbdb edison.md: Add notes on using i2c-1 w/Arduino breakout
Closes #394

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-05 15:16:16 +00:00
Mihai Tudor Panu
92cc9ea176 ftdi_ft4222.md: updated docs with latest info
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-05 09:57:08 +00:00
Eugene Bolshakov
ff6b304fd2 mraajs.i: fixes and remove useless code
Uses ::Copy instead of ::New which creates an internal buffer with malloc. This
commit also removes some useless code done after exception is raised (so won't
ever be executed)

Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-04 15:08:10 +00:00
Brendan Le Foll
2bb00b494f docs: Add changelog.md
Makes changelog a seperate file, this fixes #388

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-04 12:01:20 +00:00
Brendan Le Foll
d430b5c2b5 mraa: Update to v0.9.0
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-04 11:50:51 +00:00
Brendan Le Foll
ea183b3738 iio.c: Fix indentation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:49:08 +00:00
Brendan Le Foll
d4b32ec1c5 iio.c: Check return of fscanf
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:48:44 +00:00
Brendan Le Foll
e98bd8653a iio.c: Check return of fd before using ioctl
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:48:28 +00:00
Brendan Le Foll
ff34651325 iio.c: Replace sprintf with snprintf
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:48:02 +00:00
Brendan Le Foll
58cf292dfc iio.c: Closedir correctly and return error if we fail to read from the device dir
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:38:20 +00:00
Brendan Le Foll
15e400eaf2 iio.c: Fix leaking filedescriptor on read error
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:37:37 +00:00
Brendan Le Foll
8862ebd9f2 mraa: Remove trailing whitespace/tabs from various parts
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:27:15 +00:00
Brendan Le Foll
79609ba359 mraa: Remove executable bit from a few files
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:23:30 +00:00
Brendan Le Foll
27c097e82e x86.c: Fix include for sofia 3gr platform missing
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:18:44 +00:00
Brendan Le Foll
725ce5e946 iioc.: remove call to stat before mkdir as superflous
This is especailly true since we don't care about the outcome, or do we? We
probably should check errno for EEXIST and offer an error if the error is
something else

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:16:10 +00:00
Brendan Le Foll
fd531abd3d iio.c: Avoid reading uninitialised memory in cases of error
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:15:51 +00:00
Brendan Le Foll
f4385a8b82 iio: Check fd against != -1 and not > 0 and avoid leaks during error handling
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:15:15 +00:00
Brendan Le Foll
ee69045ea8 iio.c: Fix closedir not always been called leaving to leaked handles
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:12:55 +00:00
Srinivas Kandagatla
fcfdeb1304 96boards: remove a typo
This patch removes a typo in the board setup file which sets the number
of gpios to be zero.

Reported-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>
2015-12-18 15:51:20 +00:00