contrib/mraa.git
9 years agodocs: add minnowboard max to doxygen index page
Brendan Le Foll [Mon, 24 Nov 2014 10:50:32 +0000 (10:50 +0000)]
docs: add minnowboard max to doxygen index page

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c.h: fix typo in doxygen comment
Brendan Le Foll [Mon, 24 Nov 2014 08:04:08 +0000 (08:04 +0000)]
i2c.h: fix typo in doxygen comment

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: Added gpio list/set/get utility
Henry Bruce [Fri, 21 Nov 2014 01:15:44 +0000 (17:15 -0800)]
gpio.c: Added gpio list/set/get utility

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: Added first cut at minnow-max documentation
Henry Bruce [Fri, 21 Nov 2014 01:14:48 +0000 (17:14 -0800)]
docs: Added first cut at minnow-max documentation

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_minnow_max.c: fixed pin capability errors
Henry Bruce [Fri, 21 Nov 2014 01:13:58 +0000 (17:13 -0800)]
intel_minnow_max.c: fixed pin capability errors

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: explain aio numbering scheme
Brendan Le Foll [Fri, 21 Nov 2014 11:58:08 +0000 (11:58 +0000)]
docs: explain aio numbering scheme

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: fix mistake from mem branch where spi will fail.
Thomas Ingleby [Fri, 21 Nov 2014 02:05:43 +0000 (02:05 +0000)]
spi: fix mistake from mem branch where spi will fail.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agomraa.c: fix char count in board_name
Brendan Le Foll [Thu, 20 Nov 2014 15:00:55 +0000 (15:00 +0000)]
mraa.c: fix char count in board_name

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agooe-sdk_cross.cmake: 'make install' now targets oe sysroot
Henry Bruce [Thu, 20 Nov 2014 01:01:35 +0000 (17:01 -0800)]
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>
9 years agopwm.c: Must write period before duty_cycle to avoid sysfs error
Henry Bruce [Thu, 20 Nov 2014 00:55:48 +0000 (16:55 -0800)]
pwm.c: Must write period before duty_cycle to avoid sysfs error

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agoblink_onboard.c: Added Minnow Max support
Henry Bruce [Sat, 15 Nov 2014 00:33:38 +0000 (16:33 -0800)]
blink_onboard.c: Added Minnow Max support

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agohellomraa.c: Extended sample to display detected platform.
Henry Bruce [Thu, 13 Nov 2014 22:00:03 +0000 (14:00 -0800)]
hellomraa.c: Extended sample to display detected platform.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
9 years agogpio.c: check that real gpio did initialise correctly
Henry Bruce [Sat, 15 Nov 2014 00:32:55 +0000 (16:32 -0800)]
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>
9 years agointel_minnow_max: Added platform definition
Henry Bruce [Thu, 13 Nov 2014 21:55:58 +0000 (13:55 -0800)]
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>
9 years agogalileo gen2: add missing mux information for UART on IO1
Thomas Ingleby [Thu, 20 Nov 2014 14:59:34 +0000 (14:59 +0000)]
galileo gen2: add missing mux information for UART on IO1

Fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_edison_fab_c.c: remove uart_init_post hook for miniboard
Brendan Le Foll [Thu, 20 Nov 2014 14:23:29 +0000 (14:23 +0000)]
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>
9 years agoi2c: fix I2c::read() call
Brendan Le Foll [Thu, 20 Nov 2014 14:10:56 +0000 (14:10 +0000)]
i2c: fix I2c::read() call

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: remove smbus helper library & clean up command use in API
Brendan Le Foll [Tue, 18 Nov 2014 16:09:08 +0000 (16:09 +0000)]
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>
9 years agospi.hpp: remove transfer command from SWIG APIs
Brendan Le Foll [Tue, 18 Nov 2014 15:57:47 +0000 (15:57 +0000)]
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>
9 years agocommon.hpp: add missing docstring param for setLogLevel
Brendan Le Foll [Tue, 18 Nov 2014 15:56:33 +0000 (15:56 +0000)]
common.hpp: add missing docstring param for setLogLevel

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: add clean {write, read}data functions
Brendan Le Foll [Mon, 17 Nov 2014 16:23:49 +0000 (16:23 +0000)]
i2c: add clean {write, read}data functions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c.hpp: reorder & style header
Brendan Le Foll [Mon, 17 Nov 2014 16:15:11 +0000 (16:15 +0000)]
i2c.hpp: reorder & style header

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison.md: add 1.8V IO warning
Brendan Le Foll [Wed, 19 Nov 2014 23:52:13 +0000 (23:52 +0000)]
edison.md: add 1.8V IO warning

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.c: fix identation
Brendan Le Foll [Wed, 19 Nov 2014 23:45:58 +0000 (23:45 +0000)]
spi.c: fix identation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi.c: check memory allocation for context was succesful
Brendan Le Foll [Wed, 19 Nov 2014 23:45:35 +0000 (23:45 +0000)]
spi.c: check memory allocation for context was succesful

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio.c: free context if we fail to write to export
Brendan Le Foll [Wed, 19 Nov 2014 23:44:57 +0000 (23:44 +0000)]
gpio.c: free context if we fail to write to export

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogalileo gen 2: port mmap to new structure
Thomas Ingleby [Mon, 17 Nov 2014 17:37:34 +0000 (17:37 +0000)]
galileo gen 2: port mmap to new structure

Feature parity pre mem branch.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agogalileo gen 1: port mmap to new structure
Thomas Ingleby [Mon, 17 Nov 2014 17:26:05 +0000 (17:26 +0000)]
galileo gen 1: port mmap to new structure

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: add mmap support. read & write
Thomas Ingleby [Wed, 12 Nov 2014 16:33:56 +0000 (16:33 +0000)]
edison: add mmap support. read & write

Closes #27

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agommap: remove implementation of mmap gpio
Thomas Ingleby [Fri, 7 Nov 2014 02:02:29 +0000 (02:02 +0000)]
mmap: remove implementation of mmap gpio

Instead of trying to have an implementation that covers most platforms
Leave all mmap up to platform definition. Through function pointers.

gpio_mmap_setup sets up the mmap

Within the internal gpio context struct two more function pointers now
exist mmap_read & mmap_write. They exist there so each context can its
own function for handling a write and read.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointernal: remove un-implmented function prototype
Thomas Ingleby [Thu, 6 Nov 2014 18:02:19 +0000 (18:02 +0000)]
internal: remove un-implmented function prototype

Left over from earlier version of mraa.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm: move pwm setup to module
Thomas Ingleby [Thu, 6 Nov 2014 17:32:31 +0000 (17:32 +0000)]
pwm: move pwm setup to module

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agospi: move spi setup from core into module
Thomas Ingleby [Mon, 3 Nov 2014 16:20:02 +0000 (16:20 +0000)]
spi: move spi setup from core into module

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoi2c: move i2c setup from core into module
Thomas Ingleby [Mon, 3 Nov 2014 15:44:40 +0000 (15:44 +0000)]
i2c: move i2c setup from core into module

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoaio: move aio setup from core into module
Thomas Ingleby [Mon, 3 Nov 2014 15:16:33 +0000 (15:16 +0000)]
aio: move aio setup from core into module

Added additional syslog messages for debugging

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agogpio: move gpio setup from core into module
Thomas Ingleby [Thu, 30 Oct 2014 19:08:15 +0000 (19:08 +0000)]
gpio: move gpio setup from core into module

Added syslog lines for easier fault investigation

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointernal: add function protype for mux setup.
Thomas Ingleby [Thu, 30 Oct 2014 18:09:27 +0000 (18:09 +0000)]
internal: add function protype for mux setup.

Now accesible from all mraa modules

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agospi: expose defined CS
Thomas Ingleby [Thu, 30 Oct 2014 17:35:35 +0000 (17:35 +0000)]
spi: expose defined CS

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: fix gpio mapping on j18-8
Thomas Ingleby [Mon, 17 Nov 2014 16:05:26 +0000 (16:05 +0000)]
edison: fix gpio mapping on j18-8

Closes #37

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agogalileo gen2: add uart definitions
Thomas Ingleby [Mon, 17 Nov 2014 15:36:31 +0000 (15:36 +0000)]
galileo gen2: add uart definitions

Also added hook for setting output buffers.
fixes #36

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodocs: update libmraa intro text
Brendan Le Foll [Wed, 12 Nov 2014 13:48:46 +0000 (13:48 +0000)]
docs: update libmraa intro text

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agocmake: add cmake toolchain file for oe setup
Brendan Le Foll [Mon, 10 Nov 2014 20:48:27 +0000 (20:48 +0000)]
cmake: add cmake toolchain file for oe setup

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agobuilding.md: update cmake instructions
Brendan Le Foll [Sun, 9 Nov 2014 12:26:09 +0000 (12:26 +0000)]
building.md: update cmake instructions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogalileorevh.md: add i2c frequency info
Brendan Le Foll [Fri, 7 Nov 2014 15:05:23 +0000 (15:05 +0000)]
galileorevh.md: add i2c frequency info

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa: update to version 0.5.2 v0.5.2
Brendan Le Foll [Thu, 6 Nov 2014 15:25:01 +0000 (15:25 +0000)]
mraa: update to version 0.5.2

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm: syslog message typo correction
Matthias Hahn [Wed, 5 Nov 2014 19:26:17 +0000 (20:26 +0100)]
pwm: syslog message typo correction

Signed-off-by: Matthias Hahn <matthias.hahn@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agorgblcd.py: update example to use only writeReg()
Brendan Le Foll [Wed, 5 Nov 2014 11:20:36 +0000 (11:20 +0000)]
rgblcd.py: update example to use only writeReg()

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agorgblcd.js: add i2c example similar to python
Brendan Le Foll [Wed, 5 Nov 2014 11:13:29 +0000 (11:13 +0000)]
rgblcd.js: add i2c example similar to python

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c_HMC5883L.c: fix type in i2c buffer
Brendan Le Foll [Tue, 4 Nov 2014 19:08:08 +0000 (19:08 +0000)]
i2c_HMC5883L.c: fix type in i2c buffer

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: use uint8_t when appropriate and remove char
Brendan Le Foll [Fri, 31 Oct 2014 15:10:15 +0000 (15:10 +0000)]
i2c: use uint8_t when appropriate and remove char

Object APIs used signed chars for some operations which are not appropriate
when using i2c.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio: fix identation
Bernd Barsuhn [Tue, 4 Nov 2014 10:13:37 +0000 (10:13 +0000)]
gpio: fix identation

Signed-off-by: Bernd Barsuhn <bernd.barsuhn@me.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio: make mraa_gpio_isr_exit block until the interrupt handling thread is terminated.
Bernd Barsuhn [Wed, 29 Oct 2014 12:25:38 +0000 (13:25 +0100)]
gpio: make mraa_gpio_isr_exit block until the interrupt handling thread is terminated.

Signed-off-by: Bernd Barsuhn <bernd.barsuhn@me.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoPwm3-cycle.cpp: add pwm::enable() call to example
Brendan Le Foll [Mon, 3 Nov 2014 15:08:11 +0000 (15:08 +0000)]
Pwm3-cycle.cpp: add pwm::enable() call to example

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: add api call to read byte from a specified register
Anton Krasovsky [Thu, 30 Oct 2014 23:25:10 +0000 (23:25 +0000)]
i2c: add api call to read byte from a specified register

Signed-off-by: Anton Krasovsky <anton@no-mad.net>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agospi: expose defined CS
Thomas Ingleby [Thu, 30 Oct 2014 17:35:35 +0000 (17:35 +0000)]
spi: expose defined CS

Add missing information for Gen 2 CS info

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm: add period limits, warn over syslog
Thomas Ingleby [Thu, 30 Oct 2014 12:03:24 +0000 (12:03 +0000)]
pwm: add period limits, warn over syslog

Added minimum, maximum and default period settings to board definitions
PWM will now have a default period as defined in the board defintion.
When using pwm_write() writing 1.0f or above will default to 100%.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agocontributing.md: add a few contribution rules matching UPM
Brendan Le Foll [Wed, 29 Oct 2014 13:14:46 +0000 (13:14 +0000)]
contributing.md: add a few contribution rules matching UPM

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agopwm: fixed wrong line ending being checked by strtol
Maximilian von Tschirschnitz [Wed, 29 Oct 2014 12:52:49 +0000 (13:52 +0100)]
pwm: fixed wrong line ending being checked by strtol

Move from fopen to POSIX open introduced this bug in strtol

Signed-off-by: Maximilian von Tschirschnitz <maximilian.tschirschnitz@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoREADME: add Intel DE3815 to supported systems.
Thomas Ingleby [Fri, 24 Oct 2014 13:23:56 +0000 (14:23 +0100)]
README: add Intel DE3815 to supported systems.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agode3815: add initial doc
Thomas Ingleby [Tue, 21 Oct 2014 23:19:27 +0000 (00:19 +0100)]
de3815: add initial doc

Also removed printf used during inital implementation.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agode3815: added PWM support
Thomas Ingleby [Tue, 21 Oct 2014 22:59:53 +0000 (23:59 +0100)]
de3815: added PWM support

There are two PWM pins on the custom solutions header.
10-PWM[0] and 11-PWM[1] in mraa.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agointel_de3815: initial support for Baytrail NUC
Thomas Ingleby [Fri, 17 Oct 2014 16:29:20 +0000 (17:29 +0100)]
intel_de3815: initial support for Baytrail NUC

* I2C only currently supported, Both bus 0 and 1

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agospi: attempt to fix spi lsb mode
Brendan Le Foll [Thu, 23 Oct 2014 17:05:36 +0000 (18:05 +0100)]
spi: attempt to fix spi lsb mode

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoi2c: use default i2c bus in board config if invalid
Brendan Le Foll [Thu, 23 Oct 2014 17:05:07 +0000 (18:05 +0100)]
i2c: use default i2c bus in board config if invalid

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agosyslog: unify error msg style
Brendan Le Foll [Wed, 22 Oct 2014 20:06:45 +0000 (21:06 +0100)]
syslog: unify error msg style

syslog messages should be written as <module>: Message in order to increase
readability and usefulness

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: fix mraa_spi_bit_per_word call to use correct ioctl
Brendan Le Foll [Wed, 22 Oct 2014 19:52:11 +0000 (20:52 +0100)]
spi: fix mraa_spi_bit_per_word call to use correct ioctl

This should fix #14

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agointel_edison_fab_c.c: If i2c bus number is invalid use the default bus (6)
Brendan Le Foll [Wed, 22 Oct 2014 19:51:13 +0000 (20:51 +0100)]
intel_edison_fab_c.c: If i2c bus number is invalid use the default bus (6)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison: fix uart missing information
Thomas Ingleby [Mon, 20 Oct 2014 18:13:43 +0000 (19:13 +0100)]
edison: fix uart missing information

This should fix #19

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agouart: add pre uart hook
Thomas Ingleby [Mon, 20 Oct 2014 17:43:58 +0000 (18:43 +0100)]
uart: add pre uart hook

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoi2c: mraa_i2c_frequency now returns correct returns
Brendan Le Foll [Mon, 20 Oct 2014 09:01:53 +0000 (10:01 +0100)]
i2c: mraa_i2c_frequency now returns correct returns

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison: add uart definitions
Thomas Ingleby [Sun, 19 Oct 2014 15:25:47 +0000 (16:25 +0100)]
edison: add uart definitions

Needed to use a hook to make sure the SoC pins for RX TX are in the
right place.
Also added a line in documentation listed what interface is available.
This resolves #18

Co-Authored-By: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agouart: add init post hook
Thomas Ingleby [Sun, 19 Oct 2014 15:09:19 +0000 (16:09 +0100)]
uart: add init post hook

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agocommon: c++ link error if multiple files include header
Kurt Eckhardt [Sat, 18 Oct 2014 13:54:38 +0000 (06:54 -0700)]
common: c++ link error if multiple files include header

Header only C++ function definitions need to be static to avoid linking issues
when including the header multiple times.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: make mraa_spi_write_buf call mraa_transfer_buf
Brendan Le Foll [Sat, 18 Oct 2014 17:47:44 +0000 (18:47 +0100)]
spi: make mraa_spi_write_buf call mraa_transfer_buf

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agospi: Add SPI transfer function that pass in RX/TX
Kurt Eckhardt [Sat, 18 Oct 2014 16:25:19 +0000 (09:25 -0700)]
spi: Add SPI transfer function that pass in RX/TX

When using SPI, I prefer to not have to do malloc/free functions for each
transfer, so why not have a transfer function that you can pass in both
buffers.  With my ILI9341 TFT display code that gave some perf wins, also more
of a win, you can pass in NULL for recv buffer and the underlying device driver
does not have to copy the data.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoexception: Add exceptions when context creation fails
Brendan Le Foll [Thu, 16 Oct 2014 13:53:56 +0000 (14:53 +0100)]
exception: Add exceptions when context creation fails

* Exceptions only fired in constructor when it would initialise with a NULL
  context causing segfaults if used any further
* Adds exception.i requirement to mraa.i for node.js and python support

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoapi: correct mistake in gpio.hpp v0.5.1
Thomas Ingleby [Wed, 15 Oct 2014 11:29:08 +0000 (12:29 +0100)]
api: correct mistake in gpio.hpp

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agomraa: update to version 0.5.1
Thomas Ingleby [Wed, 15 Oct 2014 10:23:25 +0000 (11:23 +0100)]
mraa: update to version 0.5.1

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodoc: add Edison miniboard doc
Thomas Ingleby [Wed, 8 Oct 2014 17:03:40 +0000 (18:03 +0100)]
doc: add Edison miniboard doc

* Brings to conclusions Fix #10

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: miniboard GPIO mode hook added
Thomas Ingleby [Wed, 8 Oct 2014 17:02:53 +0000 (18:02 +0100)]
edison: miniboard GPIO mode hook added

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: miniboard SPI bus support added
Thomas Ingleby [Wed, 8 Oct 2014 16:23:45 +0000 (17:23 +0100)]
edison: miniboard SPI bus support added

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: miniboard i2c support added for bus 1 & 6
Thomas Ingleby [Wed, 8 Oct 2014 16:08:44 +0000 (17:08 +0100)]
edison: miniboard i2c support added for bus 1 & 6

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoedison: add missing PWM hook for miniboard
Thomas Ingleby [Wed, 8 Oct 2014 14:24:04 +0000 (15:24 +0100)]
edison: add missing PWM hook for miniboard

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agopwm: fix incorrect hook check
Thomas Ingleby [Wed, 8 Oct 2014 13:59:37 +0000 (14:59 +0100)]
pwm: fix incorrect hook check

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoRevert "CMakeLists.txt: add DEBUG define when doing a debug build"
Brendan Le Foll [Tue, 7 Oct 2014 19:19:54 +0000 (20:19 +0100)]
Revert "CMakeLists.txt: add DEBUG define when doing a debug build"

This reverts commit 52a48a728a48d4fa3af3697a22b1c565ea80907c which made debug
builds stop working.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison: add inital miniboard support
Thomas Ingleby [Tue, 7 Oct 2014 18:20:03 +0000 (19:20 +0100)]
edison: add inital miniboard support

* Only GPIO will work currently
* This fixes #11

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agocoverity: Fix issues found by coverity scan
Brendan Le Foll [Fri, 3 Oct 2014 21:50:18 +0000 (22:50 +0100)]
coverity: Fix issues found by coverity scan

* Fix a few resource leaks in error conditions
* Makes strtol() calls safer in pwm module
* Make sure buffer is terminated after read() in aio

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoindex.md: add edison link
Brendan Le Foll [Fri, 3 Oct 2014 21:49:01 +0000 (22:49 +0100)]
index.md: add edison link

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodocs: add edison to doxygen doc and coverity instructions
Brendan Le Foll [Fri, 3 Oct 2014 18:00:45 +0000 (19:00 +0100)]
docs: add edison to doxygen doc and coverity instructions

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agogpio: add more error checking for mraa_gpio_context
Brendan Le Foll [Fri, 3 Oct 2014 11:00:11 +0000 (12:00 +0100)]
gpio: add more error checking for mraa_gpio_context

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agodoc: cleanup internal documentation and naming
Brendan Le Foll [Fri, 3 Oct 2014 09:18:13 +0000 (10:18 +0100)]
doc: cleanup internal documentation and naming

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoindex.md: add ADC change for 0.5.0
Brendan Le Foll [Thu, 25 Sep 2014 13:33:44 +0000 (14:33 +0100)]
index.md: add ADC change for 0.5.0

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agosyslog: remove all fprintf calls and use syslog instead
Brendan Le Foll [Thu, 25 Sep 2014 13:31:04 +0000 (14:31 +0100)]
syslog: remove all fprintf calls and use syslog instead

Syslog is now used for all error messages, return values in the code should be
used by programmers to see the status of the library/board and syslog can be
used to see quickly from a debugging perspective what has gone wrong. A few
cosmetics where improved as well as a mraa_set_log_level() call where the
syslog log mask can be set directly from libmraa.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agomraa_internal.h: fix styling issues
Brendan Le Foll [Thu, 25 Sep 2014 13:28:08 +0000 (14:28 +0100)]
mraa_internal.h: fix styling issues

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoCMakeLists.txt: add DEBUG define when doing a debug build
Brendan Le Foll [Thu, 25 Sep 2014 13:26:32 +0000 (14:26 +0100)]
CMakeLists.txt: add DEBUG define when doing a debug build

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio.c: cosmetic fix on file
Brendan Le Foll [Wed, 24 Sep 2014 11:06:10 +0000 (12:06 +0100)]
aio.c: cosmetic fix on file

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoedison.md: add details on i2c bus number
Brendan Le Foll [Mon, 22 Sep 2014 16:49:32 +0000 (17:49 +0100)]
edison.md: add details on i2c bus number

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
9 years agoaio: change c++ calls to camelCase
Thomas Ingleby [Mon, 22 Sep 2014 16:40:05 +0000 (17:40 +0100)]
aio: change c++ calls to camelCase

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agoaio: change return from uint16 to unsigned int
Thomas Ingleby [Mon, 22 Sep 2014 14:29:02 +0000 (15:29 +0100)]
aio: change return from uint16 to unsigned int

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
9 years agodoc: add ADC information for each platform
Thomas Ingleby [Mon, 22 Sep 2014 13:52:18 +0000 (14:52 +0100)]
doc: add ADC information for each platform

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