Imraa allows the automatic flashing and setup of arduino101 subplatforms as
well as the initial setup of GPIO/i2c devices
Signed-off-by: Longwei Su <lsu@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
To ensure backwards comptability MRAA_ERROR_PLATFORM_ALREADY_INITIALISED
remains as member of mraa_result_t but now has same code as MRAA_SUCCESS
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
The reason for this is that applications that use mraa, like upm, need the
definitions contained in jni header.
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
libmraajava.so was statically linking to mraa object files causing
duplicate mraa platform instances if a UPM Java module was also loaded.
JNI functionality has been moved into src/java/mraajni.c. JVM object is
now set when JVM is loaded; see updates to src/java/mraajava.i.
This was necessary as the JVM object cannot be directly referenced from
mraa as it will not be available when building C/C++ examples.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Add support for UP board (www.up-board.org), scoping
the following functions available via 40-pin header:
* GPIO (via sysfs)
* UART
* I2C
* SPI
* PWM
Validated on UP board v0.2, running ubilinux 3.0
Signed-off-by: Dan O'Donovan <dan@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Add support for reading the direction of a GPIO
and expose it through mraa_gpio_read_dir.
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
- C API read/write integer functions changed to int to match C types
- C API now has close function to release resources acquired during init
- iio internal type isr_event() function now has args param in signature
- C++ API now supports events with handler interface and new data structure
- C and C++ examples updated to use API changes
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
scale and other attributes have to be read individually as they vary quite alot
depending on the channel. We only care/take data from scan_elements
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit creates a new structure inside each _iio device when used and can
then be used to understand the data being read after a trigger is run/executed
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This patch adds support to 96boards. 96boards is an open platform
specification. This spec strandardizes the pins on the external
connectors like Low speed and High speed. Given these pins are standard
across multiple boards, I think adding a generic 96boards made sense to
me.
The idea behind adding this generic board file is to make mraa work on
most of the 96boards with minimal changes to board support in libmraa.
This patch adds support to the LS expansion connector which has got 12
gpio pins + 2 i2c + 1 spi and 2 uarts.
For now I have added Dragaon board DB401c support as part of this patch
and is tested.
More info about board @ https://www.96boards.org/products/ce/dragonboard410c/
Long term plan is to get all this configuration from the /sys and
populate the board specifics dynamically, which is bit easy with
96boards specs in-place.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>