Private
Public Access
2
0
Commit Graph

1677 Commits

Author SHA1 Message Date
Manivannan Sadhasivam
6258bd5fdd 96boards: chardev: Move chardev enablement inside platform check
Move the chardev enablement inside the platform check.
Some boards might not have the chardev mapping yet.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-19 11:42:24 -04:00
IvanFarkas
284d882b9d Added Qualcomm DragonBoard 820c support.
GPIO ports from DragonBoard 820c Hardware Manual (p16) at
https://github.com/sdrobertw/dragonboard820c/blob/master/hardware-docs/files/db820c-user-guide.docx

Add Chardev support for DragonBoard 820c

Signed-off-by: Ivan Farkas <Ivan.Farkas@TeleCuris.com>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-10 16:49:38 -04:00
Manivannan Sadhasivam
7ea32cf1ec arm: 96boards: Add Chardev support for relevant boards
As of now both Dragonboard410c and Hikey boards run latest LTS kernel.
Hence, adding chardev support for those.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Ivan Farkas <Ivan.Farkas@TeleCuris.com>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-10 16:49:18 -04:00
Manivannan Sadhasivam
b48baf01bc gpio: chardev: Fix flag for checking kernel owned & open source gpio line
The flag used for checking the kernel owned gpio line is GPIOLINE_FLAG_KERNEL.
Hence use that instead of GPIOLINE_FLAG_IS_OUT.

Flag used for checking the open source gpio line is GPIOLINE_FLAG_OPEN_SOURCE.
Hence use that instead of GPIOHANDLE_REQUEST_OPEN_SOURCE, which should be
only used when requesting lines.

Reported-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-06 15:47:06 -04:00
Manivannan Sadhasivam
be9cd0138a arm: 96boards: Run clang-format on source code
Run clan-format on the source code for better code visibility.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-06 15:20:13 -04:00
Manivannan Sadhasivam
dee7b80f06 arm: 96boards: Add Chardev support for relevant boards
As of now both Dragonboard410c and Hikey boards run latest LTS kernel.
Hence, adding chardev support for those.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
2018-04-06 15:19:25 -04:00
Abhishek Malik
cfda9c99d7 UART: Fixing UART issues on UP2
Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
2018-03-14 16:21:42 -07:00
Mihai Tudor Panu
acff725d93 gpio: minor change to resource cleanup code
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-22 17:52:55 -07:00
mihais
ac58754756 gpio: resource cleanup fix for chardev changes
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-22 17:45:34 -07:00
Mihai Tudor Panu
bbcdb1e087 up2: adding platform examples for built-in user leds
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-22 15:29:01 -07:00
Mihai Tudor Panu
d9c54e1d31 up2: added chardev map to platform
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-14 16:10:03 -07:00
Mihai Tudor Panu
cf2e69a8ea chardev: boards need to specify chardev support explicitly before runtime check is performed
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-14 14:39:42 -07:00
Noel Eck
7021096fd7 common.hpp: Handle const char* nullptrs
Fixes for possible NULL pointer dereferencing by C++ header methods.
Updated string methods to return an empty string.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-14 10:54:10 -07:00
Noel Eck
fa40262d89 api: Fixes for missing mraa methods.
This commit includes a set of small fixes flushed out from the google
unit tests.

    * Fixed missing implementations of mraa_get_*_count methods.
    * Fix for NULL string
    * Fix for MOCK platform C++ define.
    * Switched (void) -> () function definitions for consistency.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 16:24:04 -07:00
Noel Eck
467cf5132d gtest: Added Google Test
Added Google Test for unit testing.  Currently NOT required by
MRAA CMake.

    * Added a test fixture for mraa common C header methods.
    * Added a test fixture for mraa common C++ header methods.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 16:16:49 -07:00
Noel Eck
76c8b9a76e travis-ci: Added minimal travis job
Added an additional job to the CI matrix which does a minimal mraa build
(only C) which can run and pass/fail quickly.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-03-13 12:10:34 -07:00
Mihai Tudor Panu
4be5d915af spi.c: fix warning on syslog string format
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-03-12 16:23:47 -07:00
Brendan Le Foll
ea6d771c2b gpio.h: Add gpio_event doc
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
mihais
2b98fc7869 gpio: chardev interface / multiple gpio support for sysfs
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
fbc2ad6045 chardev: split up helper functions in gpio_chardev
Remove some _multiple functions and replace with generic function that
does both. Some general cleanup and will move more interrnal mraa
functions to use the _mraa prefix

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
32ab283c2b firmata_mraa.c: Fix warnings in firmata code due to incorrect code
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Mihai Stefanescu
9f7caf1561 Joule: Add gpiod mapping for Joule
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
12c1904fba gpio.h: Add stripped kernel header
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Mihai Stefanescu
1665e09928 gpio: Add gpio chardev interface
Signed-off-by: Mihai Stefanescu <mihai.t.gh.stefanescu@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:42:02 +01:00
Brendan Le Foll
aa7006cce9 travis: Remove IPK & RPM builds
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:40:00 +01:00
Brendan Le Foll
9bc3ffe815 raspberry_pi.c: Removing spi_frequency_replace as that has become default behaviour
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:34:40 +01:00
Brendan Le Foll
7840710d1b spi.c: Stop trusting SPI_IOC_RD_MAX_SPEED_HZ from the kernel and trust our users
SPI_IOC_RD_MAX_SPEED_HZ is often incorrect and too low (RPI, UP2, galileo g1 at
least). Likely this is because driver writers are too concious of possible
issues or because they don't have the final hardware. Because of this we now
will only LOG_NOTICE on exceeding SPI_IOC_RD_MAX_SPEED_HZ and try keep going
anyways. This effectively will put the burden of not exceeding
SPI_IOC_RD_MAX_SPEED_HZ on our users.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 13:34:40 +01:00
Brendan Le Foll
ae2371c804 cmake: Remove all cpack options including IPK generation
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-03-05 11:45:39 +01:00
Alex Tereschenko
2deaa73ebf static code analysis: correct SonarCloud URL
According to SonarCloud's email notification,
they're dropping sonarqube.com in favor of sonarcloud.io.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-03-02 20:27:15 +01:00
Mihai Tudor Panu
fbb7d92320 mraa: Update to v1.9.0
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-02-15 15:08:49 -08:00
Alex Tereschenko
2d210621cc mraa.c: make mraa_gpio_lookup() return proper pin index
Pinmap field value is an OS pin number, not mraa pin index,
so make the function return the proper one.

Fixes #817.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-02-07 17:28:58 +01:00
Brendan Le Foll
568c077061 building.md: Add note for static builds and bindings
Closes #864

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-02-07 09:42:34 +01:00
Mihai Tudor Panu
616ffc0b94 cmake: fix indentation on some messages for consistency
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-02-06 20:48:32 -05:00
Mihai Tudor Panu
60b77d5da9 FindNodejs: extend search path to detect ubuntu provided nodejs
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-02-06 20:29:37 -05:00
Noel Eck
cb03cab04a FindNodejs: Updated to find node<version>
Updates to the FindNodejs.cmake module to find newer installs of nodejs
across other distros.  For example openSUSE: /usr/include/node6/node.h

    * Added PATH_SUFFIX to find_path for node.h.
    * Standardized usage of message() (added STATUS)
    * Call find_package_handle_standard_args with version
    * Reformatted to look uniform.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-02-06 10:05:39 -08:00
Khem Raj
c9566bdc6f examples: include endian.h for be16toh and le16toh declarations
this gets exposed on musl, on glibc endian.h gets pulled in indirectly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-02-06 13:34:28 +01:00
Manivannan Sadhasivam
eda9d03547 examples: Cleanup Python examples
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-02-06 13:31:19 +01:00
Alex Tereschenko
c7faa20c14 readme: add Sonar quality gate badge
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-02-06 13:27:37 +01:00
Alex Tereschenko
2c9d9aaf80 intel_edison_fab_c.c: use snprintf(), not sprintf(), to avoid overflows
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-02-03 17:05:25 +01:00
Alex Tereschenko
fd937e69ef src/led.c: make sure we don't try to close a NULL dir
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-02-03 17:05:25 +01:00
Alex Tereschenko
6e13268301 examples: fix static code analysis findings
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-02-03 17:05:25 +01:00
Alex Tereschenko
9b08a97d46 docs: add static code analysis documentation
Fixes #782.

Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2018-01-28 15:34:50 +01:00
Manivannan Sadhasivam
25b951dd6a examples: Fix samples.mapping
Fix samples.mapping.txt with the cleaned-up C++ examples

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-25 11:24:23 +01:00
Manivannan Sadhasivam
9f44dc45d8 api: mraa: gpio: Fix doxygen warning
This commit fixes the below doxygen warning:

"warning: unexpected token in comment block while parsing the argument of command param"

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-25 11:23:36 +01:00
Manivannan Sadhasivam
d7490d87f2 api: mraa: Add cleaned-up C++ examples to doxygen doc
Add the cleaned-up C++ examples to doxygen doc by modifying the @snippet
tag.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-25 11:23:36 +01:00
Manivannan Sadhasivam
83a67b96fd examples: Cleanup C++ examples
Modify the C++ examples to be of same coding standard like C. As a
part of this cleanup, a new LED example is also added.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-25 11:23:36 +01:00
Manivannan Sadhasivam
eaaebae69d examples: c++: Add mraa include path to CMakeLists.txt
C++ specific examples depends on headers in api/mraa, so include
them in CMakeLists.txt

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-18 14:12:08 +01:00
Manivannan Sadhasivam
e562c774cf examples: cleanup examples directory
Following changes are done as a part of cleanup:

1. Moved the platform specific `C` examples from top level examples/
directory to platform/ subdirectory and renamed helloedison.c to
gpio_edison.c

2. C specific examples are moved to a new c/ subdirectory. As a part
of this process, examples are modified to follow same standards
and few new examples are also added.

3. Include the newly added C examples to relevant API documentation

4. Ran clang-format for all source files in c/, c++/, platform/
subdirectories

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-18 14:12:08 +01:00
Mihai Tudor Panu
3fb65de4b8 mraa.rst: adding Led class API links to Python docs too
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-01-16 15:04:54 -08:00
Mihai Tudor Panu
d538bbc91f index.md: add Led class documentation links to API index page
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-01-08 12:10:22 -08:00