After rebase UP Xtreme supported platform enum value was changed
to 24 in types.h, this commit updates the enum value in types.hpp
to this value.
Signed-off-by: Michael Campion <michael.campion@emutex.com>
UP Xtreme is based on the Intel(R) Core(TM) i3/i5/i7 Whiskey Lake SoCs.
The UP Xtreme presents one Raspberry Pi compatible HAT connector.
This implementaion supports i2c, spi, uart, adc and gpio through the
40pin HAT connector.
Gpio chardev capabilities have been disabled in this implementation. When
gpio chardev capabilities are enabled an input becomes unreadable after an
isr has been registered to the pin. See here for details:
https://github.com/intel-iot-devkit/mraa/issues/937
Tested on UP Xtreme, with UP Board Linux kernel 5.0.0
Features tested: gpio, gpio interrupts, i2c, spi, adc and uart.
Signed-off-by: Michael Campion <michael.campion@emutex.com>
This commit introduces mraa_gpio_init_by_name API for initializing
a GPIO by its line name provided by the kernel. This feature depends
on the GPIO chardev support and also the line names present in devicetree
or board files. Accessing GPIO using its line name, removes the dependency
from MRAA specific pin mapping and provides a cleaner way to access GPIOs.
This will solve the issue created by an external gpiochip probing before
the SoC's internal gpio controller and thereby making the MRAA pin mapping
wrong.
Currently, this API only supports initializing a single GPIO at a time.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1. Add support for initializing onboard LEDs based on board definition.
Maximum LED count has been set to 12.
2. Introduce mraa_led_init_raw API for initializing LEDs based on
function name. This API can be used by platforms which doesn't have mapping
in board definition.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Since peripheral manager does not build in the IIO source, ifdef's were
added around the initio functionality for IIO.
IMO this is an ugly fix, but I don't see a better way since the
PERIPHERALMAN architecture is qualified throughout the CMake and source
with ifdef's.
Signed-off-by: Noel Eck <noel.eck@intel.com>
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>
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>
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>
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>
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>
This patch adds support for using on board LED through sysfs.
Commonly available LED parameters are supported.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
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>
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>
* 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>
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>
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>
This patch adds a function to query UART settings in an unintrusive way.
It can be used using a uart index or a devpath and it strives to just
read out the settings without affecting the state of the UART.
Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This patch has no changes in function. It fixes three style issues
to be more readable and in line to the rest of the codebase:
- return types are declared on a separate line
- reversal of Yoda conditionals
- initialize for loop variable inside loop declaration
- Fix styling of pwm lookup doxygen
Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
MRAA C++ getPlatformType casts the return from mraa_get_platform_type()
to a Platform enum (which did not exist in C++ for AT). Added enum type
to types.hpp which corresponds to the C enum type.
Signed-off-by: Noel Eck <noel.eck@intel.com>
* Update documentation for C methods
* Update documentation for CXX methods
* Update build instructions for building on AT Peripheral Manager Client
Signed-off-by: Noel Eck <noel.eck@intel.com>