Brendan Le Foll
54deb01796
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 >
2014-10-16 15:07:18 +01:00
Thomas Ingleby
23feec94d0
edison: miniboard GPIO mode hook added
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-08 18:02:53 +01:00
Thomas Ingleby
0cba580ca6
edison: miniboard SPI bus support added
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-08 17:23:45 +01:00
Thomas Ingleby
1dd5f89b37
edison: miniboard i2c support added for bus 1 & 6
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-08 17:10:11 +01:00
Thomas Ingleby
03114cbadb
edison: add missing PWM hook for miniboard
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-08 15:24:04 +01:00
Thomas Ingleby
c5102dffba
pwm: fix incorrect hook check
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-08 14:59:37 +01:00
Thomas Ingleby
d1717fa2bb
edison: add inital miniboard support
...
* Only GPIO will work currently
* This fixes #11
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-10-07 19:20:03 +01:00
Brendan Le Foll
2b5e38b40c
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 >
2014-10-03 22:50:18 +01:00
Brendan Le Foll
6d5a3d796c
gpio: add more error checking for mraa_gpio_context
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-03 12:00:11 +01:00
Brendan Le Foll
c5c5c9b700
doc: cleanup internal documentation and naming
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-10-03 10:18:26 +01:00
Brendan Le Foll
32d8a6f0ca
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 >
2014-09-25 14:31:04 +01:00
Brendan Le Foll
886044b90f
aio.c: cosmetic fix on file
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-24 12:06:10 +01:00
Thomas Ingleby
e82a76593d
aio: change return from uint16 to unsigned int
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-22 15:29:02 +01:00
Thomas Ingleby
6a7add6b99
aio: add calls for changing bit value of the read
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-22 14:52:45 +01:00
Brendan Le Foll
dcc4efbaf8
hello_isr.py: add sleep to the example to reduce confusion
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-19 01:06:59 +01:00
Thomas Ingleby
ef20d5ed3e
edison: add supported adc bit information
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-10 16:31:49 +01:00
Thomas Ingleby
fb1034b2b0
hook: add spi init hooks
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:01:23 +01:00
Thomas Ingleby
dd9129d411
hook: add pwm hook around init
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:01:23 +01:00
Thomas Ingleby
62a1493bdf
aio: internal aio context to mraa_internal_types
...
* Some comments for members of structure also added
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:00:27 +01:00
Thomas Ingleby
92cbb6097c
aio: add init hooks, and fp hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 18:00:23 +01:00
Thomas Ingleby
d43235caf0
edison: add hook for handling modes for gpio
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
0696268be3
python: dont set c_flags globally
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
181ba35f4d
javascript: dont't wipe other cxx flags
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
0a1cf1af3b
edison: spi addition completed
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
f29b9c421f
edison: add spi mux definitions
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
b9a54dc7b6
edison: add gpio support on A0-A5
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
1b293790e7
edison: add pwm support on 3,5,6,9 - default state
...
* The swizzler situation is a bit odd to describe in mraa
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Thomas Ingleby
e7bb0d8f25
edison: add analog input support
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:29:42 +01:00
Brendan Le Foll
0ed1508315
aio.c: fix ordering of comparison operator
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 17:29:40 +01:00
Brendan Le Foll
ad4c42ee93
intel_edison_fab_c.c: simplify invalid return in mraa_intel_edison_gpio_init_post
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 17:29:36 +01:00
Thomas Ingleby
995565b2e1
edison: added i2c support on bus 6
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
57bd8d5b5d
edison: add i2c bus definitions
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
f9e6a6efd4
i2c: disallow non allowed i2c buses
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
167765098b
edison: add gpio definitions.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
011ce1d196
edsion: add logic to handle tristate around directions
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
eba959e5f6
edison: add edison specific logic
...
* Board definition started
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
e602460688
hook: move gpio init post hook
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Thomas Ingleby
5766b03068
intel_edision_fab_c: renamed from fab_b
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:28:43 +01:00
Brendan Le Foll
854585ef49
gpio.c: styling - remove tabs
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-09 17:28:28 +01:00
Thomas Ingleby
cb63c2782e
edison: add edison detection
...
* Will look for BODEGA BAY or SALT BAY
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:13:22 +01:00
Thomas Ingleby
c9c1735e42
intel_edison_fab_b: initial board definition
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-09 17:13:18 +01:00
Brendan Le Foll
2687e5a7c4
docs: add common i2c doc page i2c.txt
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-07 21:20:06 +01:00
Brendan Le Foll
0d04677c98
uart: add C++ Uart module and links to swig
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-09-03 09:30:49 +01:00
Thomas Ingleby
111544a764
gen 2: add hook for handling modes for gpio
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-02 14:46:48 +01:00
Mark Ceisel
9cf6cad45a
pwm: add config_ms and config_percent.
...
* Allows user to set both at the same time. Will reset to previous if
* period for duty cycle fails to write
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-01 12:18:01 +01:00
Thomas Ingleby
a8bbd55562
pwm: rename internal functions from get to read
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-09-01 11:30:58 +01:00
Thomas Ingleby
3f1dff163c
spi: if platform has one spidev, defaults to it.
...
* Removes complexity on some platforms.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-08-26 13:55:58 +01:00
Brendan Le Foll
df05dc58ca
spi: prefix SPI mode with MRAA_SPI_
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-08-08 09:32:28 +01:00
Kiveisha Yevgeniy
998095d802
spi: added spi mode to mraa
...
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com >
2014-08-06 11:40:51 +00:00
Brendan Le Foll
551e553894
example.rst: improve and fill out python documentation
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-08-05 10:58:16 +01:00