362 Commits

Author SHA1 Message Date
nascs
d59936ffd4 Add ROCK 4 Java support (#16) 2023-03-24 14:50:47 +08:00
Alvin
f854463c34 add ROCK 3C support
Signed-off-by: Alvin <alvin@radxa.com>
2022-10-22 11:30:34 +08:00
nascs
fc8c9061a6 Add support for Radxa CM3 IO base board (#14) 2022-09-28 16:33:05 +08:00
Ken
ad0cb85903 add support for rock3a
Signed-off-by: Ken <ken@radxa.com.com>
2021-12-09 15:00:07 +08:00
Ken
9aa7ac1f65 add support for radxa zero
Signed-off-by: Ken <ken@radxa.com>
2021-10-27 20:29:45 +08:00
Shine
06b2be27c7 Add support for ROCK Pi X
Signed-off-by: Shine <yll@radxa.com>
2020-12-08 10:30:43 +08:00
akgnah
12d13ab9e6 rockpi4: add model c support
Signed-off-by: akgnah <1024@setq.me>
2020-12-08 10:26:09 +08:00
Shine
f9673ea531 Add support for ROCK Pi E
Signed-off-by: Shine <yll@radxa.com>
2020-12-08 09:53:16 +08:00
zzl
803b486f42 Add support for ROCK Pi N10
Signed-off-by: zzl <zzl@radxa.com>
2020-10-12 10:37:05 +08:00
zzl
a99dce5140 Add support for ROCK Pi S
Signed-off-by: zzl <zzl@radxa.com>
2020-09-12 11:18:13 +08:00
Michael Campion
3d781603f3 upxtreme: Match UP Xtreme Platform enum value
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>
2020-01-06 15:17:55 +00:00
Michael Campion
d954599045 upxtreme: Add UP Xtreme support
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>
2020-01-06 15:17:55 +00:00
gowtham.r
4ba5da1144 adding Adlink IPi SMARC x86/ARM support
Signed-off-by: gowtham.r <gowtham.r@adlinktech.com>
2019-12-03 07:52:58 -08:00
Thomas Ingleby
170bdd104f spdx: add spdx tags to most files
Large change that removes the duplicated MIT notice withe a spdx tag

Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2019-05-23 10:09:12 -07:00
Manivannan Sadhasivam
0a12c5a017 gpio: Introduce mraa_gpio_init_by_name API
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>
2019-05-10 16:29:13 +05:30
Brian Lee
b8349c0ffe rockpi4: Add rockpi4 support
Closes #958

Signed-off-by: Brian Lee <brian@vamrs.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2019-03-28 13:09:46 -07:00
Adelin Dobre
678e540291 initio: Add safety checks inside MraaIo destructor
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2019-02-21 09:53:54 -08:00
Manivannan Sadhasivam
6fcd882d58 led: Add support for initializing onboard LEDs based on board definition
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>
2018-09-05 09:05:26 +05:30
Noel Eck
6fe510a27f Peripheralman: Remove IIO from ioinit for android
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>
2018-07-23 21:40:45 -07:00
Mihai Stefanescu
ae391fe9fe String based IO initialization for MRAA
Signed-off-by: Mihai Stefanescu <mihai.stefanescu@rinftech.com>
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-07-23 21:40:12 -07:00
Mihai Tudor Panu
4c4845b101 types.hpp: add missing mediatek boards to platform enum
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-06-11 22:52:37 -07:00
Mihai Tudor Panu
9c5f940dad aiotdevkit: add support for IEI Tank platforms
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
2018-05-31 21:21:53 -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
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
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
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
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
Manivannan Sadhasivam
e1382ad845 led: Add on board LED support
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>
2017-10-19 14:01:14 +02:00
Serge Vakulenko
6770be911b Add support for MIPS-based boards Omega2 and Linkit Smart 7688
Signed-off-by: Serge Vakulenko <vak@besm6.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-10-05 10:54:57 +02:00
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
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
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
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
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
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
Brendan Le Foll
4109b8b454 aio: Update documentation to mention 0 indexed
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-06 15:56:14 +02:00
Tapani Utriainen
a6f2464bb1 uart: add a function to query current UART settings
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>
2017-05-28 08:11:21 +02:00
Tapani Utriainen
d6edf76680 mraa: add accessor functions to return counts of spi, pwm, gpio and adcs
Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-05-28 08:11:21 +02:00
Tapani Utriainen
b7e8d96945 mraa: add a function that returns the number of uarts available
Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-05-28 08:11:21 +02:00
Tapani Utriainen
5ef3f3ea29 mraa.c: add a by-name lookup function also for UARTs
Signed-off-by: Tapani Utriainen <tapani@technexion.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-05-16 17:14:30 +02:00
Tapani Utriainen
dc1255ad75 mraa.c: fix style of lookup functions
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>
2017-05-16 17:14:30 +02:00
Jon Trulson
e0a0dac47b uart: add tcsendbreak support
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
2017-05-08 21:15:33 +02:00
Noel Eck
1379c1fe33 types.hpp: Added Platform type for PIO
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>
2017-05-04 11:10:08 -07:00
Noel Eck
aeb293a163 Peripheralman: Update peripheralman API docs
* 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>
2017-04-24 16:04:33 -07:00
Vineela Tummalapalli
913eaf2440 periphmraa: Create IndexLookup functions for GPIO, I2C, SPI, PWM
These lookups provide the MRAA index with the Pin/Bus name as input

Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:55 -07:00
Brendan Le Foll
4c7616fe91 android-things: Prep for peripheralmanager support
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-04-24 14:42:54 -07:00