Brendan Le Foll
effc813e42
mraa.c: fix possible overrun in strncpy
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-18 11:57:41 +01:00
Brendan Le Foll
32aa4310c8
mraa.c: simplify mraa_get_platform_name with subplatforms
...
This removes the chance of buffer overflow with a subplatform
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-18 11:52:52 +01:00
Matthew Auld
434f454139
intel_minnow_byt_compatible: fix memory leak
...
mraa_adv_func_t was allocated twice for the adv_func field
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-18 11:39:26 +01:00
Henry Bruce
1a29dc9910
i2c.c: Added check for NULL i2c context
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-17 11:34:35 +01:00
Brendan Le Foll
0aac9df414
Revert "intel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA"
...
This reverts commit 5c7bab1c79 . Fixes #280 .
2015-09-16 07:42:43 +01:00
Evan Steele
e2aaa349ff
minnowboardmax: Add support for compatible boards
...
Signed-off-by: Evan Steele <evan.steele@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:38:46 +01:00
Petre Eftime
0071039fa0
intel_galileo_rev_g.c: Fix uninitialized subplatform on Galileo Gen2
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:26:16 +01:00
Petre Eftime
35760929db
mraajava.i: Initialize mraa when library is loaded by the JVM
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:26:16 +01:00
Petre Eftime
c9c6ac785a
mraajava.i: Return array properly for SPI write
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:26:16 +01:00
Jonas Norling
5c7bab1c79
intel_edison_fab_c.c: Don't initiate SPI pins when initializing MRAA
...
Calling mraa_intel_edison_misc_spi() is not really needed, because the
GPIO 10..13 pins will be configured correctly when the user actually
inits them as GPIO pins. When using these pins for GPIO,
mraa_setup_mux_mapped() and mraa_intel_edison_gpio_init_post() will do
all this work based on the pin map and pinmodes for the Edison Arduino
board.
On the contrary, this function would break any user of the SPI bus
that is already running.
Signed-off-by: Jonas Norling <jonas.norling@connode.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-14 10:26:43 +01:00
Alex Tereschenko
b650a9fdc9
uart.hpp: Added missing include for types.hpp
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-14 09:24:37 +01:00
Mihai Tudor Panu
f245cacd6f
common.hpp: inlined getSubPlatformIndex to avoid multiple defs
...
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-12 08:31:52 +01:00
Brendan Le Foll
99b7f131d9
mraa-i2c.c: remove unused arguments to printf statements
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 15:09:28 +01:00
Brendan Le Foll
54bf18b246
aio.c: missing free for aio contexts in error cases for _init()
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 15:09:06 +01:00
Brendan Le Foll
17eb7a791a
intel_galileo_rev_d.c: Fixed missing goto leaving board unfreed in error case
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 15:00:40 +01:00
Brendan Le Foll
1937473c01
aio.c: missing return for internal init
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:58:55 +01:00
Petre Eftime
a0791f8277
gpio.hpp: remove unused args parameter from Java isr method
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:54:43 +01:00
Petre Eftime
3934897864
mraa: Add types.hpp; Use types.hpp for C++ and SWIG
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:54:28 +01:00
Brendan Le Foll
679d1a55b6
ft4222: Add documentation for usb platform
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
b2a0bbfcbc
hellomraa.c: Remove i2c calls
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
07343e2ee7
mraa: Remove global advance_func struct and place it in platform configuration
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
fc55088c03
ftdi_ft4222.c: clean up, styling fix
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
a49d8d6d12
cmake: remove FTDI D2xx flag
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
2101e491ce
mraa-i2c: Updated to use new sub-platform API.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
6284806b96
mraa-gpio: Support new sub-platform calls.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
3e76bee085
api: Added API calls that support both main and sub platforms
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
ba85c9ebc2
ft4222.c: Fixed bug in write_byte_data
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
b841d6c75c
common.hpp: Removed platform selection methods.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
c03d746544
types.h: Added NULL platform
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
c84cd4328a
cmake: Disable USB sub-platform support by default
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
570fba9463
mraa.c: usb MRAA_UNKNOWN_PLATFORM is not considered initialisation
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
4757d039ab
mraa.c: Fix current_plat being invalid but not NULL
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
eb5a3ac5d2
cmake: add ${mraa_LIBS} to linker for swig libraries
...
This means that the correct libraries are added when mraa_LIBS is appended,
fixes ft4222 handling with SWIG APIs
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
5bd5f2d546
common.hpp: Added sub platform API calls.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
4031124081
api: Renamed some sub-platform API calls.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
b109a12dd1
mraa-i2c: Added interactive mode.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
308289497e
tests: make tests work on python3
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
4acb0e5562
cmake: USB source files now added to mraa_LIB_PLAT_SRCS_NOAUTO
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Henry Bruce
b20a685b0c
i2c: mraa_i2c_init_raw fixed and sub-platform updates.
...
mraa_i2c_init_raw now works again without platfrorm defined.
More API calls now support sub-platform
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Brendan Le Foll
79e33890b6
usb.c: move usb platform not found msg to debug
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Brendan Le Foll
7c5972ad15
mraa.c: use #if defined() for platforms
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
c9cfb42326
mraa.c: Fixed bug in detected main/sub platform name and type logging
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
93d326bff4
ftdi_ft4222.c: Removed i2c read/write logging messages.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
89d25cffeb
gpio.c: Removed spurious logging message
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
99901d05f7
ftdi_ft4222.c: Implemented i2c_frequency().
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
33645791af
api: Added mraa_has_sub_platform() function
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
453eefc56a
usb: Added gpio isr support to ft4222
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
001e291d63
mraa-gpio: Added sub-platform support.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
802c5af986
usb: Added gpio read/write support for ft4222 with i/o expander
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00
Henry Bruce
11bf69e29a
i2c.c: Refactored init calls to use mraa_i2c_init_internal()
...
mraa_i2c_init_internal() implenents logic of mraa_i2c_init_raw()
allowing mraa_adv_func_t to be passed in as a parameter
instead of of being global.
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:03 +01:00