gpio.c: free context if we fail to write to export

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
spi.c: check memory allocation for context was succesful

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
spi.c: fix identation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
edison.md: add 1.8V IO warning

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
i2c.hpp: reorder & style header

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
i2c: add clean {write, read}data functions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
common.hpp: add missing docstring param for setLogLevel

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
spi.hpp: remove transfer command from SWIG APIs

Transfer command works with a uint8_t buffer that is written into, this does
not work in SWIG APIs and will cause a copy in either case, so the API call is
not useful. Remove to stop confusion.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
i2c: remove smbus helper library & clean up command use in API

This commit changes the mraa_i2c_read() API call behaviour, a register should
now always be set when using this call. The smbus helper library is no longer
required since the code is now all contained from i2c.c which avoids multiple
function calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
i2c: fix I2c::read() call

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
intel_edison_fab_c.c: remove uart_init_post hook for miniboard

use uart_init_pre hook instead. Fixes #39

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
galileo gen2: add missing mux information for UART on IO1

Fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
intel_minnow_max: Added platform definition

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
gpio.c: check that real gpio did initialise correctly

On platforms without muxing perform a little more checking when the 'real'
linux/sysfs gpio is opened. We don't expect this to fail but on platforms where
the linux gpios can be changed depending on pinctrl/bios configuration this
might not always be the case.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
hellomraa.c: Extended sample to display detected platform.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
blink_onboard.c: Added Minnow Max support

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
pwm.c: Must write period before duty_cycle to avoid sysfs error

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
oe-sdk_cross.cmake: 'make install' now targets oe sysroot

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
mraa.c: fix char count in board_name

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>