Private
Public Access
2
0
Commit Graph

1604 Commits

Author SHA1 Message Date
Mihai Tudor Panu
cc55ee6314 grovepi: grovepi subplatform support via i2c
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-14 13:10:37 +02:00
Nicola Lunghi
c6b1b18a9d src/x86/up.c: Added support for uart cts/rts
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:55:36 +02:00
Nicola Lunghi
64a0db6a50 up: various fixes in pin naming on up1 and up2
fixes naming in up and up2 platform
- changed the name of the i2c function
- add a warning in the log if a name is not found

Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:55:07 +02:00
Javier Arteaga
04a40ed63f src/x86/up2.c: Add UP^2 EVT3 support
This commit adds a MRAA platform for the UP Squared board, EVT3 revision.
It handles the relevant FPGA configuration updates when using MRAA to
change pin modes or toggle GPIO directions.

Signed-off-by: Javier Arteaga <javier@emutex.com>
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:54:39 +02:00
Nicola Lunghi
6fad8d9888 src/x86/up.c: get i2c numbering from pci information instead of hardcoding it
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:54:39 +02:00
Nicola Lunghi
2e2cd37cfa src/x86/up.c: add platform version information
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:54:34 +02:00
Nicola Lunghi
d78ad91635 src/x86/up.c: Require kernel FPGA control
abort the loading of mraa if the up kernel module is not loaded

Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:48:02 +02:00
Nicola Lunghi
45127e04b9 Add support for UART hardware flow control
This allows assigning platform pins to the CTS/RTS lines.
If provided, these will be muxed as UART when flow control is enabled.

Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:48:02 +02:00
nick
6185f0ac92 rpi: Return 0 if mmap is already done
Signed-off-by: Nick Crast <nicholas.crast@anaren.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:40:57 +02:00
nick
8356c2f03d rpi: Adding PWM support
The Pi doesn't have userspace level PWM support, but you can mmap the
raw registers and configure it that way, which is what this patch is
doing. Tested with Raspberry Pi 3 B. I am able to set the duty cycle,
change the frequency, and set the pulse width. Signals verified with
logic analyzer. Note that the only accessible pwm is on GPIO18, which is
also used by the audio subsystem.

Signed-off-by: Nick Crast <nicholas.crast@anaren.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-12 11:40:38 +02:00
Manivannan Sadhasivam
615e0cd83a src: arm: Add mmap support for db410c
This commit adds mmap support for 96Boards Dragonboard410c

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-06 11:18:33 +02:00
Ferry Toth
6a1ed23246 intel_edison_fab: enable support for vanilla kernels >= 4 for serial
This disables changing pinmux as this is envisioned to be done through acpi
provided by u-boot

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-06 11:18:33 +02:00
Brendan Le Foll
c2787441b4 java: Fix path to mraajni.c
Fix error in e2f964a280

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-06 11:18:33 +02:00
Brendan Le Foll
e2f964a280 swig: use swig_add_modules if cmake > 3.7
swig_add_module has been deprecated

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-09-06 11:11:10 +02:00
Noel Eck
65e30bf7d3 iio: Allow mraa_iio_trigger_buffer to handle void* args
Previously, mraa_iio_trigger_buffer took a void* args but did not use
this.  Included implementation to allow user to pass a void* to this
method and have the corresponding pointer returned in the interrupt
handler.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-08-30 14:14:41 -07:00
Noel Eck
1217c5c034 examples: Remove heap allocation from C++ examples
Small cleanup of MRAA C++ examples.  Switched from heap allocation to
stack allocation when possible.  This simplifies the samples since it
removes the need for explicit memory management.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-08-23 14:49:12 -07:00
Sanrio Alvares
d50b646c35 peripheralman: fix uart data available api
Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-08-22 16:12:51 +02:00
Alex Tereschenko
badf25f289 phyboard.c: fix whitespace error
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-08-19 19:48:44 +02:00
Alex Tereschenko
ba72c5b089 arm: fix compiler warnings
There were unused variables, incorrect pointer operations
and plan broken string comparison.

Now there's only one - for unused uart3_enabled in beaglebone.c,
but we want to keep it for declaration consistency.

Also fixes #757.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-08-19 19:48:44 +02:00
Nicolas Oliver
c4e23e1a41 sonar: remove sonar-scan from allow_failures
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-08-18 11:17:39 -07:00
Nicolas Oliver
e0a1862ce3 Travis CI and Documentation Generation improvements
* Use docker images from docker hub instead of building them on Travis
* Fix doxygen warnings for C/C++ Documentation
* Fix examples inclusion in documentation
* Modify Travis build matrix to include stages and additional jobs
* Update doxygen2jsdoc submodule
* Add doxyport submodule
* Generate documentation for each language in Travis
* Add sonar.java.binaries to sonar-scan.sh

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-08-10 10:47:11 -03:00
spitfire88
14bf91af44 peripheralman: fix uart and add supported replace functions
Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-28 14:34:05 +02:00
Tapani Utriainen
f71b4be059 beaglebone.c: use the ret variable in i2c_init_pre also when successful
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-28 14:33:16 +02:00
Tapani Utriainen
0b1ccf526f beaglebone.c: check devpath only once in i2c_init_pre
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-28 14:33:16 +02:00
Tapani Utriainen
46e5aab56e beaglebone.c: let i2c_init_pre return an error if muxing fails
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-28 14:33:16 +02:00
Tapani Utriainen
8f57b21a26 beaglebone.c: use snprintf instead of sprintf in i2c_init_pre
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-28 14:33:16 +02:00
Abhishek Malik
808d314043 firmata_mraa.c: Handling PWM period
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-22 07:33:09 +02:00
Nicolas Oliver
95068c4259 docs: Add documentation for building mraa with docker
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:46:45 +02:00
Nicolas Oliver
189b959012 sonar: modify sonar-scan.sh script
Prevent execution on non configured env & add sonar target to allowed failures
in travis

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:46:45 +02:00
Nicolas Oliver
4bedd68c4e travis: improve docker images generation for building
Make a build heriarchy to reduce images size.
Add Android Thing Build.

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:46:45 +02:00
Sanrio Alvares
3d77c86634 peripheralman: implement gpio interrupt
Add gpio interrupt support for peripheral manager based on the
existing implementation in gpio.c.
Rewrite steps by using a global reference to lookup java isr
routine using JNI methods and add exception check after every call.
Free local reference class since it's not garbage collected and will
lead to a memory leak.

Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:09:37 +02:00
Sanrio Alvares
5bbea8010e peripheralman: fix return values
Be consistent with the return values from MRAA and propagate the
errors received from PIO in case of failure. PIO returns 0 on success
and negative errno on failure. Handle APIs that must return length of
read/written data if PIO returns success.

Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-21 08:08:56 +02:00
Martino Facchin
86e7ece2f6 pwm.c: Fix crash if pin == phy_pin_count
Signed-off-by: Martino Facchin <m.facchin@arduino.cc>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-20 11:27:30 +02:00
Noel Eck
08c7c0215e changelog.md: Small fix to typo in changelog
Changed Documentnatino - > Documentation

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-07-13 09:43:38 -07:00
Mihai Tudor Panu
4f3eae90e8 sonar-scan: disable code scans for mraa clones as they require setup
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2017-07-12 20:28:59 -07:00
Nicola Ponte
7d6164c136 gpio: Add support for push-pull/open-drain output mode
This attribute is not part of gpio standard attributes
so it's necessary to implement a custom version of this function

Signed-off-by: Nicola Ponte <nicola.ponte@u-blox.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-04 10:12:03 +02:00
Alex Tereschenko
be9fcf2b2d .gitignore: add Sonar and VSCode dirs
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-07-03 20:23:10 +02:00
Alex Tereschenko
fc00fa20d2 static code analysis: introduce automated scans via SonarCloud
This adds Travis and Docker configurations for automated scans,
both for master branch and internal PRs.

External PRs won't be checked due to security concerns
(and Travis limitation related to that) - GH and SonarCloud tokens
are not propagated to those.

An organization and project must be created in SonarCloud for reporting,
as well as a technical GH user with mraa repo commit permission, to set
PR statuses in the "checks" section.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-07-03 20:23:10 +02:00
Alex Tereschenko
caf75a68c0 jsonplatform.c: properly reallocate memory for platform name
Fixes #761.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-07-01 18:06:33 +02:00
Manivannan Sadhasivam
bd3d9d8cab gpio : Add support for input pull up/down modes
Make use of 'active_low' interface in sysfs for configuring input pin
in pull up / pull down mode. C++ binding also has been added.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-28 12:14:50 +02:00
Alex Tereschenko
3f932ac952 x86.c: sanitize data read from sysfs during board detection
Fixes #771.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-24 12:26:46 +02:00
Alex Tereschenko
d544e3c2f6 jsonplatform.c: fix potential segfault at pin label processing
Also update docs to reflect the max label length.

Fixes #738.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-21 14:12:34 +02:00
Alex Tereschenko
30bbb88685 mraa.c/x86.c: use exact match in strncmp() to avoid surprises
Closes #736.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-21 14:12:30 +02:00
Alex Tereschenko
e0052acfa7 mock tests cmake cfg: use PYTHON_DEFAULT_INTERP instead of _EXECUTABLE
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:48:29 +02:00
Alex Tereschenko
3731f88c4f python3 cmake cfg: correct typo in defines
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:48:29 +02:00
Brendan Le Foll
869f76c5c5 python: only add python dir if we have the prerequisites
This means we can depend on the directory existing to check if the
prerequisites are met in the tests/ section

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:48:29 +02:00
Brendan Le Foll
e1778c811d tests: add USEPYTHON3TESTS to explicitly use python3 for tests
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:48:29 +02:00
Brendan Le Foll
09f8b3ac7b tests: Remove checks for mraa.py python module
As commented by @alext-mkrs - When cmake runs through these lines, the
make naturally hasn't run yet, so there are no such files, so it doesn't
set the PYTHON_DEFAULT_INTERP variable and that causes it not to add
tests to the list later on

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-19 20:46:18 +02:00
Alex Tereschenko
32196d10e9 joule: align SPI bus numbering with reality
Also update docs to make the numbering and pins used crystal clear.

Closes #758.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-06-15 20:49:18 +02:00
Nicolas Oliver
000746c20d build config: fix parameter configuration for docker-compose
We were incorrectly using clang all the time, overriding gcc.
This also brings newer version of docker-compose.

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-06-10 18:15:09 +02:00