Brendan Le Foll
ff3b3004da
intel_gt_tuchuck.c: Add SPI to joule pinmap file
...
This commit fixes documentation for SPI bus to match latest changes in pinmap
file
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-09-07 13:51:32 +01:00
Brendan Le Foll
8ec4fcb333
intel_galileo_rev_g.c: use pincmd to set OUT_HIGH instead of value
...
The i/o expander looses connection as soon as direction is set so use direction
OUT_HIGH instead of setting value after direction. Closes #573
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-09-02 12:00:29 +01:00
Brendan Le Foll
bf2a504774
firmata_mraa.c: retry counter should not be decremented past 0
...
This means the retry counter works appropriately in case of failure. Closes #574
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-09-02 11:49:26 +01:00
Brendan Le Foll
1591b92605
python2/cmake: Remove unused pydocs target
...
Pydocs has been deprecated in favour of sphinx as it's really very very ugly
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 15:43:23 +01:00
Alex Tereschenko
0292c960b3
mock SPI: remove loop variable declarations
...
While working fine on my Fedora 22, under Travis (and Ubuntu)
that fails asking to enable C99 standard first, so let's be conservative.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 12:32:20 +01:00
Alex Tereschenko
9ff47aa64a
mock SPI: correct error message to actually use data provided
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 12:32:20 +01:00
Houman Brinjcargorabi
a704a956ea
raspberry_pi.c: Added support for pi zero
...
Signed-off-by: Houman Brinjcargorabi <hbrinjcar@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 12:30:56 +01:00
Brendan Le Foll
94b7477212
intel_gt_tuchuck.c: Make sure GPIOs are set to 0 muxes
...
Use calloc for pinsize and set mux_total to 0 in all gpios
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 12:26:36 +01:00
Brendan Le Foll
1589389c3f
intel_gt_tuchuck.c: LED101 reset to GPIO338
...
A bios change to 395 was never made so this broke LED101
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-30 11:40:32 +01:00
Alex Tereschenko
bdbbfd03dd
mraa mock: Add SPI functionality
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-19 16:00:53 +01:00
Alex Tereschenko
9030ae2eeb
spi.c: added replace functions for all basic actions
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-19 16:00:53 +01:00
Alex Tereschenko
3a638caf01
spi.c: added context validity checks
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-19 16:00:53 +01:00
Alex Tereschenko
07f6181c91
mock_board_i2c.c: removed surplus includes
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-19 16:00:53 +01:00
Houman Brinjcargorabi
4277a3ee23
mraa.c: Replaced string values with #defines
...
Signed-off-by: Houman Brinjcargorabi <hbrinjcar@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-19 15:46:39 +01:00
Brendan Le Foll
49ee1ebef5
Revert "binding.gyp.cmake: Fix npm builds by stopping dependency on json-c"
...
This reverts commit 50213f97bc . This sets
JSONPLAT during compilation and doesn't disable it during cmake's configure
process which is done by jenkins. This means that mraa_init_platform_json never
gets define since it's under an #ifndef
2016-08-10 09:17:48 +01:00
Thomas Ingleby
fce4daab02
mraa: Correct spelling of capabilities
...
Type was correctly spelt, but the member in the platform strut was not.
My mistake from 2014.
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com >
2016-08-08 21:44:00 +02:00
Brendan Le Foll
50213f97bc
binding.gyp.cmake: Fix npm builds by stopping dependency on json-c
...
This disables JSONPLAT but means we can build on stuff without json-c
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-03 16:49:30 +01:00
Brendan Le Foll
36153ad7ad
intel_galileo_rev_d.c: Move code for gen1 from pwm.c to advance function
...
This re-enables correct PWM on gen1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-03 13:27:35 +01:00
Brendan Le Foll
aed965c27d
pwm.c: Remove manual gpio muxing when using a pin that has both pwm & gpio enabled
...
This fixes PWM on the GT platform. The code was only used on gen1 galileo and
is rarely used because it's the only platform in mraa that supports 2 functions
on the same pin without any time of advanced function pointer being called
(gen2/edison). GT however has kernel side muxing which causes the gpio to be
initialised meaning the PWM channel is never set to active as it's activated
after the GPIO is opened and the GPIO keeps precendence
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-08-03 13:25:32 +01:00
Houman Brinjcargorabi
ca0d740ee0
CMakeLists: Added json platform options and build
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:33:29 +01:00
Houman Brinjcargorabi
8ba8ce3b26
mraa.c: Added init platform from json file
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:33:29 +01:00
Alex Tereschenko
346f447c4d
mock: added I2C functionality
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:28:53 +01:00
Alex Tereschenko
26718a67a2
mock: split out aio and gpio implementations to separate files
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:28:53 +01:00
Alex Tereschenko
0021b1aace
i2c: fixed i2c_stop_replace function never being called
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:28:53 +01:00
Alex Tereschenko
da3efdc4b9
i2c: added standard context validity checks
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:28:53 +01:00
Houman Brinjcargorabi
230b6084ba
firmata_mraa.c: Fixed aio bug
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-27 11:10:54 +01:00
Brendan Le Foll
874d0f47bd
gt: allow for i2c bus to move around a little
...
Unfortunately GT has alot of i2c buses, the second lot of designware buses can
turn up after the i915 i2c buses but since they all have the same name, we do a
dumb check to see if they are 5/6 or 9/10. Hopefully future kernel/firmware
will let us do something smarter.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-12 12:26:46 +01:00
Alex Tereschenko
63b244cfc3
mock: added AIO pin and logic
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-11 10:48:43 +01:00
Alex Tereschenko
917a1bd371
aio: added context validity and replace function checks to aio_close()
...
Added standard context validity check, another check for a replace function
and corrected a return statement to fit our standard code style.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-11 10:48:43 +01:00
Alex Tereschenko
e43459d031
aio: added standard context validity check to aio_read()
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-11 10:48:43 +01:00
Mihai Tudor Panu
eabee5f864
gt-tuchuck: fix I2C bus typos in board definition file
...
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-09 08:40:10 +01:00
Alex Tereschenko
1af737f3d9
mock: mraa with mock platform now works in Windows under MSYS2
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-05 19:32:58 +01:00
Alex Tereschenko
bcb6adc551
mock: added mraa mock platform infra and GPIO implementation
...
Mock platform allows one to use mraa without having any real HW.
This commit makes necessary foundational changes and implements
GPIO functionality as well as adds respective tests.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-05 16:19:05 +01:00
Houman Brinjcargorabi
593fd0be54
mraa.c: Removed duplicate sys/stat.h
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-05 11:11:19 +01:00
Houman Brinjcargorabi
3992f9d596
mraa.c: Remove duplicate string.h include
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-07-05 11:03:44 +01:00
Alex Tereschenko
9634f17a2a
gpio: fixed potential null pointer dereference in mraa_gpio_read_dir()
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-30 16:10:11 +01:00
Brendan Le Foll
fe9264c98f
mraa.c: fix unsigned int comparison by usign UINT_MAX instead of -1
...
This works since both are essentially 'impossible' values.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-29 10:02:50 +01:00
Lay, Kuan Loon
de0543923c
iio: mount matrix compliant to IIO core kernel standard
...
IIO mount matrix is supported in kernel version 4.6.
Change mraa_iio_get_mount_matrix to take in one more parameter
‘mount matrix sysfs entry name’, because different sensor driver
may expose different mount matrix sysfs entry.
Following link explain the mount matrix usage and sysfs entry:
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-29 10:02:08 +01:00
Bruce Beare
c1fd2896c2
edison: fix edison spelling errors
...
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-29 09:59:29 +01:00
Bruce Beare
5704c15665
gt: Add module lights to the gpio HAL
...
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-29 09:58:57 +01:00
Alex Tereschenko
f9bc314223
x86.c: fixed typo in Tuchuck board forced enablement
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-27 11:43:38 +01:00
Brendan Le Foll
50e1b568fb
pydocs: Fix sys.path for multi python because added python2 dir
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-24 14:21:55 +01:00
Brendan Le Foll
0577321f4c
intel_gt: add support for gt + Tuchuck board
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-23 16:16:38 +01:00
Alex Tereschenko
8af6843566
PWM: added workaround for Edison's problem with 0% duty
...
As described in issue #91 , on Edison setting 0% duty doesn't
disable the PWM on a pin completely.
Therefore we add a couple of Edison-specific _pre functions
and an internal PWM state variable, which we use to toggle PWM
enabled/disabled based on what duty is set for the pin.
Closes #91 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-16 14:12:33 +01:00
Houman brinjcargorabi
c413a43d5a
mraa.c: Fixed logic error when deciding if the description is null
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-01 15:21:55 +01:00
Stefan Andritoiu
03b548c33b
java: Added version information & checks to ensure Java version matches Native version
...
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-01 15:21:12 +01:00
Houman brinjcargorabi
8329bcab62
intel_edison_fab_c.c: fixed the pins not being freed in the event of a tristate read failing
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-01 11:29:17 +01:00
Houman brinjcargorabi
e8d6f38ee0
intel_nuc5.c: Fixed incorrect I2C numbering, effectively not shifting the pin number correctly
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-01 11:29:15 +01:00
Brendan Le Foll
99841419ab
python: Support building of both python2 & python3 bindings
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-05-26 14:51:34 +01:00
Houman brinjcargorabi
a321d6707f
mraa.i: Swig interface options to ignore the void* IO constructors and pre-initialise the c++ template functions
...
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-05-24 11:21:13 +01:00