First four pins (0 to 3) are now built-in FTDI GPIO/I2C pins
If i2c GPIO expander is detected, next 8 pins (4 to 11) are its GPIO
If i2c switch is detected an extra 4 i2c busses are added
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
mraa_adv_func_t->gpio_init_internal_replace() now has mraa_gpio_context
parameter so that override function can access both physical and logical
pin numbers.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
The change allows to build shared libraries by default on Linux, while
respecting the requested library build type when the standard CMake flag
BUILD_SHARED_LIBS is defined.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Uses ::Copy instead of ::New which creates an internal buffer with malloc. This
commit also removes some useless code done after exception is raised (so won't
ever be executed)
Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This is especailly true since we don't care about the outcome, or do we? We
probably should check errno for EEXIST and offer an error if the error is
something else
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Fix memory leak in mraa_iio_update_channels() and mraa_iio_get_channel_data().
In mraa_iio_update_channels(), we add checking for out of bound array access.
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@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>
E.g. on Edison they have LFs and that may cause problems
with downstream consumers of this data.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
We now take into account only "iio:device*" files to filter out
fake devices like triggers.
Closes#299.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This means that a valid platform is no longer required for iio operations and
therefore this is now only a req for using USBPLAT
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Code crept in from ft4222 branch merge and is superflous becuase of the new
advance function structure
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>