Henry Bruce
7ea11f0dd3
mraa.c: iio detect tidy up.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
c1d081c783
examples: Extended iio_dummy_test to cover more cases.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
ae80d4afc8
iio: Isolated use of open() to string read/write functions.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
131021a629
mraa.c: Moved iio detection code into a function
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
0049ba1378
mraa_internal.h: Added mraa_iio_detect() function declaration
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
448f14f41c
examples: Added iio_dummy_test, a test app that uses iio_dummy driver
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Henry Bruce
fbfe3e315f
iio: mraa_iio_write_string now using open insteam of fopen
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
b77bf40c34
iio.md: add triger_now option
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
cb09ff2327
iio.md: add kernel config option
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
e975a690ab
iio.md: skeleton documentation
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
3750e2cfa2
iio: iio update channel
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
e7e58509f0
iio: iio add create trigger
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
8d7c0722ab
iio: iio get mounting matrix remove unused variable and proper file close
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
0bd1ab2c53
iio: iio add get mounting matrix
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
edb7f8a215
iio: iio consolidate read and write API
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
219632a1b8
iio.c: run clang format on iio.c
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
8a548de8ae
iio.c: add stropts.h include for iotctl
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
13086cb2db
mraa_internal.h: Add fnmatch.h include
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
069985641e
iio.c: Use MAX_SIZE var upgrading strings to 128 from 64
...
Fix inspired by Lay's PR #342 but doesn't use magic numbers
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
657f28a67d
iio: trigger buffer samples fix
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
2df28fa883
iio: iio get channel and get event error checking
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
078b6371d7
iio-example: printf take extra argument
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
7a55a1384a
iio: added mraa_iio_write
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
dc240913c7
iio: remove exec perms
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Lay, Kuan Loon
4c41d2c2df
iio: added event api
...
Signed-off-by: Lay, Kuan Loon <kuan.loon.lay@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Alex Tereschenko
e5f28ab04c
mraa.c: we now remove trailing CR/LF from IIO dev names
...
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 >
2015-12-15 10:42:06 +00:00
Alex Tereschenko
325ac461d6
iio: added function returning IIO device number by name
...
Closes #309 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Alex Tereschenko
7fa4990d81
iio: fixed IIO device counting
...
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 >
2015-12-15 10:42:06 +00:00
Alex Tereschenko
3b55cc70bf
iio: fixed comment typo
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
65614f5f58
iio: Remove iio structures from mraa_platform_t
...
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 >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
529cf8a26e
mraa_func.h: Remove unused code
...
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 >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
acfb74f04e
iio: Improve iio channel parsing to add enabled channels
...
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 >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
2c97fd5953
iio: initial pass at getting channel information from scan_elements
...
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 >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
b192e7a223
iio_driver.c: remove weird API calls
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
2b9e832ff9
iio: Simplify API
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
d8c2c7c483
iio: Find attributes and channels in iio device
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
8c19105309
iio_driver.c: Add example for iio interface
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
ba9ab4b384
mraa.c: Fix path of iio device in sysfs
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
d920d136ea
iio: initial API and enumeration of devices
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Brendan Le Foll
0f312545e0
iio: Add initial module
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-15 10:42:06 +00:00
Alex Tereschenko
1947426baf
docs: added UART examples into Python docs.
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 15:34:16 +00:00
Alex Tereschenko
f9a31956ab
examples: added more elaborated Python UART example
...
Closes #376 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 15:34:16 +00:00
Stefan Andritoiu
d80e4295aa
mraajava.i: The director now uses a GlobalRef instead of a WeakRef to the IsrCallback object
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 15:33:34 +00:00
Jorge Ramirez-Ortiz
36fabe3245
96boards: add support to HiKey 96board
...
This patch adds support to HiKey board which complies with 96boards spec.
More info about board @https://www.96boards.org/products/ce/hikey/
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 11:01:38 +00:00
Srinivas Kandagatla
c0dfb71237
96boards: add support to 96boards ( https://www.96boards.org/ )
...
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 >
2015-12-14 11:01:28 +00:00
Srinivas Kandagatla
47ec54c333
TargetArch.cmake: Add support to aarch64 based platforms
...
This patch adds support to aarch64 arm 64 bit platforms.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 11:00:04 +00:00
Srinivas Kandagatla
38aa9e8fe6
uart.c: make use of no_bus_mux flag
...
This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 11:00:04 +00:00
Srinivas Kandagatla
5e0c6d3807
spi.c: make use of no_bus_mux flag
...
This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 11:00:00 +00:00
Srinivas Kandagatla
b2e8af641b
i2c.c: make use of no_bus_mux flag
...
This patch makes use of no_bus_mux flag in mraa_board_t to skip
unnessary mux checks.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 10:59:54 +00:00
Srinivas Kandagatla
e14534b071
mraa: Add flags to not setup bus pinmux
...
This is an attempt to make the mraa work on wide boards with minimal
board setup.
Most of the arm boards with latest kernel have pinmux already setup by
the driver and its really not necessary for mraa to check each pin and
icheck if the pinmux is required or not. Having this flag would cut lot
of code in board support and its possible to add some generic board
support which can make use of mraa easily.
Without this patch each board support has to have pins setup in there
bus structure.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 10:52:27 +00:00