Brendan Le Foll
9235ed178a
Pwm3-cycle.cpp: add pwm::enable() call to example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-03 15:08:11 +00:00
Kurt Eckhardt
2a11e31052
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 >
2014-10-19 09:00:57 +01:00
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
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
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
Dan Yocom
99bc1392e4
javascript: added basic examples to mraa
...
Signed-off-by: Dan Yocom <dan.yocom@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-08-15 10:19:23 +01:00
Brendan Le Foll
9765aa9bce
i2c_HMC5883.py: add python I2c.read() example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-08-05 10:44:43 +01:00
Brendan Le Foll
31c0eb33e5
i2c_HMC5883.py: add i2c read & write example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-29 16:02:42 +02:00
Brendan Le Foll
11f1f784c7
rgblcd.py: fix example to use 0xFF and not 0x255 which is out of bounds
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-29 12:16:27 +02:00
Brendan Le Foll
11a2e559a1
cycle-pwm3.py: make example use real pin3 and make work on gen2
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-24 15:17:11 +01:00
Brendan Le Foll
1f6afb0a18
cycle-pwm3.py: fix example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-24 10:10:04 +01:00
Thomas Ingleby
9f2f5be20a
uart_setup: add example on current uart use.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-10 09:33:36 +01:00
Brendan Le Foll
acfe9b7793
Blink-IO.cpp: use mraa_result_t instead of int
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-04 15:49:07 +01:00
Brendan Le Foll
4b0f24367a
common.hpp: use common.hpp instead of renaming C functions in interface
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-04 15:42:04 +01:00
Brendan Le Foll
720008f61f
blink_onboard.c: add missing newline char
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-03 14:51:24 +01:00
Brendan Le Foll
437e26781c
mraa: add deinit function for valgrind testing
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-01 16:38:41 +01:00
Brendan Le Foll
b1def2a784
spi: update spi module to use char instead of unsigned char as return values
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-01 14:56:12 +01:00
Brendan Le Foll
8eff646cb0
I2c-compass.cpp: fix example to use char instead of uint8_t
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-01 14:55:47 +01:00
Brendan Le Foll
70ba5a56ab
i2c: allow binary strings as parameters to write() functions in scripting
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-01 13:51:28 +01:00
Brendan Le Foll
b36321ac50
blink_onboard.c: fix compilation warnings
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-26 15:07:17 +01:00
Brendan Le Foll
c821c84e4a
mraa: pymraa becomes mraa and mraajs becomes mraa
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-25 17:49:07 +01:00
Thomas Ingleby
6853997a92
mraa: rename from maa to mraa
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-06-24 17:24:54 +01:00
Brendan Le Foll
79d0da4853
maa: change complex C++ write calls to CamelCase for spi & i2c
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-24 14:42:24 +01:00
Brendan Le Foll
2664d7c0e0
hello_isr.py: add license header
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-24 14:41:41 +01:00
Brendan Le Foll
17edeb3e7a
i2c.hpp: add I2c::writeReg method
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-24 14:40:34 +01:00
Brendan Le Foll
48f7b0695d
blink_onboard.c: add missing blink onboard example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-20 18:18:05 +01:00
Brendan Le Foll
475a692638
maa: add maa_get_platform_type function and move swig common to type.h
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-20 18:00:19 +01:00
Thomas Ingleby
f035dcd341
Merge branch 'gen2'
2014-06-20 16:22:27 +01:00
Kiveisha Yevgeniy
6fbe2a7e53
gpio: Added args param to maa_gpio_isr and added documentation
...
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com >
2014-06-19 16:23:43 +00:00
Brendan Le Foll
84d1e3ba25
I2c-compass.cpp: fix example to use HMC5883L_CONT_MODE
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-18 09:59:50 +01:00
Brendan Le Foll
116d437a79
example.js: make require path follow NODE_ENV and NODE_PATH
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-12 09:54:51 +01:00
Brendan Le Foll
2d12e3bd1c
example.js: fix example to use up to date API
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-12 07:59:06 +01:00
Brendan Le Foll
faedfce419
maa: add global maa.h and maa.hpp and stop using /usr/include/maa/
...
* pkg-config now only sees maa.h & maa.hpp
* usage of maa/*.{h,hpp} is still allowed
* examples updated to use maa.{h,hpp}
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-10 16:47:37 +01:00
Brendan Le Foll
5b191ab6cd
api: add proper doxygen comments to C++ headers and normalise doc
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-30 17:19:08 +01:00
Thomas Ingleby
e86e8bf211
Merge branch 'gpio-mem'
2014-05-29 16:36:43 +01:00
Thomas Ingleby
7af6a96a13
mmap: added mmap io to gpio
...
* added function to gpio to use mmap
* changed board definition format around mmap io (fast-gpio)
* Intel Galileo Rev D updated to follow changed definitions
* Example performing mmap io to pin 2 added.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-29 16:30:07 +01:00
Brendan Le Foll
a02923beec
docs: Add docs/ folder with in depth topics as well as DoxygenLayout.xml file
...
* C headers now have @briefs and include examples
* Examples have altered 'Interesting' Sections
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-29 14:51:38 +01:00
Brendan Le Foll
dd3ffe8b78
examples: add Interesting snippet tags to examples and link in Readme.md
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-28 11:00:36 +01:00
Brendan Le Foll
360c10a5e0
aio.py: add aio python example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-27 10:43:46 +01:00
Brendan Le Foll
d6852c63a7
doxygen: add examples from examples dir and include one section on Readme.md
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-23 14:47:34 +01:00
Brendan Le Foll
d847ae7847
i2c: use uint8_t throughout to make code clearer
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-23 14:21:53 +01:00
Brendan Le Foll
ff720b67f5
I2c-compass: add -lm to linker
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-22 14:52:10 +01:00
Brendan Le Foll
fb7da58139
cmake: install examples in ${prefix}/share/maa/examples
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-22 14:26:11 +01:00
Thomas Ingleby
8d21d477b8
examples: added more cpp examples.
...
Mostly just the same functionality as the C examples yet using the cpp
api.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-22 14:17:33 +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
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
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
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