Brendan Le Foll
94941f5100
gtest: fix version test and change test cmake var name
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 15:40:28 +01:00
Brendan Le Foll
521b6817d7
python: include examples page for sphinx documentation that links to src examples
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 15:39:58 +01:00
Thomas Ingleby
7abd8f5529
gpio: add ownership gaurd
...
* Will not unexport if the context did not export it. Can be forced.
* Checks if pin is already exported.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 14:11:41 +01:00
Thomas Ingleby
5fa6f50edc
pwm: added existing exposition logic
...
* Understands when pwm pin is already exported.
* Will not unexport if didnt export. Can be forced.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 14:07:19 +01:00
Thomas Ingleby
fa7180cb91
pwm: use posix open instead of fopen
...
* Add safety to output char arrays and filepaths.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 10:57:20 +01:00
Thomas Ingleby
e2f72540ef
gpio: use open in all function opposed to fopen
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 10:57:15 +01:00
Brendan Le Foll
b0707886af
maa.i: fix definition of printError in interface file
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 11:47:38 +01:00
Brendan Le Foll
a697512eed
cmake: version bump to 0.2.5
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 11:05:43 +01:00
Thomas Ingleby
0c82a47fe4
pwm: changed to use strtol for return values.
...
* Minor spelling corrections
* Small format change in function. Incorrect spacing.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:49:41 +01:00
Thomas Ingleby
6333a21c6f
pwm: removed disabling pin on unexport.
...
Needed to be handled differently based on the running platform
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:49:36 +01:00
Brendan Le Foll
3d10fc1c0d
gpio.c: PyEval_Call now casts void* to PyObject* before call, fixing warning
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:35:29 +01:00
Brendan Le Foll
adcefeaba1
i2c: fix write API to use const char*
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:34:36 +01:00
Brendan Le Foll
608bc4fdcf
maa.i: add return types to swig constants
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 09:58:01 +01:00
Brendan Le Foll
9314eb2c90
maa.i: add printError() function to swig API
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 09:51:59 +01:00
Brendan Le Foll
1160c99816
maa.i: rename get_version() to getVersion()
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 09:51:31 +01:00
Brendan Le Foll
a49d357849
maa.c: add stdlib.h to remove clang warning
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 09:50:58 +01:00
Brendan Le Foll
3731263752
C++: Change enum types to be shorter in C++
...
* This changes the swig interface so Python/Node APIs change slightly
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 09:49:30 +01:00
Brendan Le Foll
5d9fc39ae9
hello_isr.py: fix usage of isr in python example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 17:52:06 +01:00
Brendan Le Foll
104555b908
cmake: version bump due to API change
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 17:10:34 +01:00
Brendan Le Foll
8979ff4194
README.md: add changelog to explain API changes
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 17:04:04 +01:00
Thomas Ingleby
1434f8f317
blink-io-cpp: example gpio using cpp wrappers.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 16:58:14 +01:00
Brendan Le Foll
0765a9454b
c++: Add C++ runtime library to linker patch
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:45:16 +01:00
Brendan Le Foll
bf50a94a8e
spi: fix use of memset sizeof param
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:44:14 +01:00
Brendan Le Foll
045b704063
gpio: fix use of memset sizeof param
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:44:04 +01:00
Brendan Le Foll
09d3f380c1
swig: add gpio enum definitions on interface file
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:47 +01:00
Brendan Le Foll
d0240cd50a
spi.hpp: Add C++ wrapper around Spi
...
* maa_spi_context becomes an opaque pointer
* C++ wrapper class Spi created
* swig now uses C++ wrapper Gpio to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:46 +01:00
Thomas Ingleby
41f619048d
spi: added example for use with mcp4261
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:44 +01:00
Thomas Ingleby
9186b79967
spi: implemented write functions
...
Still basic, more work needed
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:43 +01:00
Thomas Ingleby
0c7939a556
spi: changed write function prototype.
...
* Added write_buf for buffer transfer
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:41 +01:00
Thomas Ingleby
352e1e084d
spi-pinmap: added spi checking functions.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:40 +01:00
Thomas Ingleby
ed23cc44e4
intel_galileo_rev_d: fixed SPI bus id.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:39 +01:00
Brendan Le Foll
058084cd88
gpio.hpp: Add C++ wrapper around Gpio
...
* maa_gpio_context bcomes an opaque pointer
* C++ wrapper class Gpio created
* swig now uses C++ wrapper Gpio to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:37 +01:00
Brendan Le Foll
f0763844fa
pwm.hpp: Add C++ wrapper around Pwm
...
* maa_pwm_context becomes an opaque pointer
* C++ wrapper class Pwm
* swig now uses C++ wrapper Pwm to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:36 +01:00
Brendan Le Foll
8a03e61f43
i2c.hpp: Add C++ wrapper around I2c
...
* maa_i2c_context bcomes an opaque pointer
* C++ wrapper class I2c created
* swig now uses C++ wrapper I2c to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:34 +01:00
Brendan Le Foll
e491f99228
i2c.hpp: Add C++ wrapper around I2c
...
* maa_i2c_context bcomes an opaque pointer
* C++ wrapper class I2c created
* swig now uses C++ wrapper I2c to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:33 +01:00
Brendan Le Foll
9e823b7f1d
maa_init: fix constructor attribute in maa_init and add working example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:31 +01:00
Brendan Le Foll
554505b640
aio.hpp: Add C++ wrapper around Aio
...
* maa_aio_context becomes an opaque pointer
* C++ wrapper class Aio created
* examples/c++ with a sample for Aio created
* swig now uses C++ wrapper Aio to generate an API
* python generated code is now C++
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:30 +01:00
Brendan Le Foll
e84406d697
cmake: make maa link against pthreads directly
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-15 16:40:40 +01:00
Brendan Le Foll
9387c943d9
cmake: fix hard includ of node headers for cross compile
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-15 16:40:40 +01:00
Brendan Le Foll
6dc1500f5a
gpio: make isr_exit function use pthread_cancel and treat error cases more cleanly
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-15 14:42:44 +01:00
Brendan Le Foll
8460b1f743
blink-io: make sure maa_gpio_init was successful
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-15 10:41:23 +01:00
Brendan Le Foll
acfc804f26
cmake: increase version to 2.3
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-14 14:08:29 +01:00
Brendan Le Foll
f185877860
aio: remove _u16 suffix from call. Make return type a uint16_t
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:25:21 +00:00
Brendan Le Foll
9eb87fc665
blink-io: add stdlib.h for strtol call
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:24:48 +00:00
Brendan Le Foll
6811fe4a24
gpio: add signal type to pthread_kill
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:18:46 +00:00
Brendan Le Foll
5141d24565
pwm: always return a value if stated in prototype
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:18:22 +00:00
Brendan Le Foll
19415ff2e4
i2c: fixed impossible unsigned comparisons
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:17:42 +00:00
Brendan Le Foll
e35cfb6861
aio: remove use of atoi and cleanup debug
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:10:41 +00:00
Brendan Le Foll
4ef5176dad
aio: use posix read/lseek API
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 21:59:54 +00:00
Brendan Le Foll
320341df4d
aio: fix styling of case statement
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 21:59:22 +00:00