Alexander Komarov
4302f0d0c3
java: Added Java SWIG binding creation
...
%init directive is not supported in java so move %init to js/py interface files
Signed-off-by: Alexander Komarov <alexander.komarov@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-04-24 12:12:11 +01:00
Michael Ring
5dfd8e43df
examples/mraa-gpio.c: Fixed compiler warning due to missing include
...
Warning fixed is atoi not being defined when building on Fedora 22
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-04-04 17:53:20 +01:00
Henry Bruce
a1c5bd8742
CMakeLists.txt: Added option to install mraa-gpio tool
...
This commit renames gpio.c to mraa-gpio.c to make installation in bin/ less
annoying
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-03-31 13:56:29 +01:00
Thomas Ingleby
52c53760b2
api: introduce define for pin name size
...
MRAA_PIN_NAME_SIZE currently set at 12.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-03-23 17:25:27 +00:00
Brendan Le Foll
ffcf3d7d07
clang-format: run clang-format on C/C++ code
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-03-23 15:15:48 +00:00
Michael Ring
8b0b9f1a79
examples/gpio: Re-implemented the display of pin names
...
Re-introduced AIO Pins
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-03-19 00:19:50 +00:00
Brendan Le Foll
797b137826
i2c_HM5883.py: remove old python example
...
Example was using old string based read API which is deprecated in python and
gives confusing advice, there are enough python i2c examples so removing this
one
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-25 16:01:36 +00:00
Brendan Le Foll
163a40e6e7
examples: add uart examples for js & py
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-20 15:04:03 +00:00
Brendan Le Foll
d6891e8bd7
isr.js: add node.js isr example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-18 16:41:31 +00:00
Michael Ring
ffe40033d4
examples/spi_max7219.c: Example for 16bit wide convenience functions
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-17 15:39:54 +00:00
Michael Ring
244879697f
examples/gpio.c Added support for mmap access to gpio
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 21:13:20 +00:00
Michael Ring
a4431e7a3e
examples/gpio.c Added whitespace to better align gpio list output
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 21:13:20 +00:00
Brendan Le Foll
818e1a86de
examples/gpio.c: Fix some formatting & code style
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 16:16:30 +00:00
Brendan Le Foll
b32507064d
examples/gpio.c: fix getchar() not working in ssh term
...
This is obviously not a nice way to do input handling but it avoids having more
code in the samples than is really needed
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 15:50:59 +00:00
Henry Bruce
403424e4c0
examples/gpio.c: Added command to monitor pin level changes using ISR
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 15:41:37 +00:00
Alex Tereschenko
e7c3c17eb3
examples/aio: Added examples for mraa_aio_read_float()/readFloat()
...
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-05 10:43:26 +00:00
Thomas Ingleby
94dd44a2d3
example/gpio.c: Remove extern to plat
...
Use exposed api functions to get board information.
Added version option for version and name
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 16:24:21 +00:00
Brendan Le Foll
456646ca53
blink_onboard.c: explain use of calamari lure in example
...
Closes #96 .
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-20 23:50:43 +00:00
Brendan Le Foll
b7a0856f51
spi: Make Spi write() work from SWIG with typemaps
...
This change also changes the C++ API write(char) call to writeByte(uint8_t) and
the write() call now takes a uint8_t* instead of a char*. This should not alter
any code significantly and does not affect the C API.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-14 11:52:12 +00:00
Brendan Le Foll
ec5c09fe37
I2c-compass.cpp: fix incorrect usage of write/writeByte
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-06 11:37:07 +00:00
Brendan Le Foll
461015a22f
bmp85.js: add i2c read/write example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-06 11:24:56 +00:00
Brendan Le Foll
23fca714e1
bmp85.py: add simple example of new i2c read func
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-06 11:24:55 +00:00
Brendan Le Foll
87e242a07b
helloedison.c: add edison type example
...
This small example shows the use of mraa_get_pin and documents the owner
concept
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-05 14:35:56 +00:00
Brendan Le Foll
ade49a82b3
examples: use mraa_get_platform_name API in examples
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-27 09:38:06 +00:00
Brendan Le Foll
8be861aa1f
hello_isr.py: add counter to example
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-25 10:37:36 +00:00
Henry Bruce
27f22d077b
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 >
2014-11-21 20:06:37 +00:00
Henry Bruce
41bbc0b86b
blink_onboard.c: Added Minnow Max support
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2014-11-20 15:08:31 +00:00
Henry Bruce
4e0165c45a
hellomraa.c: Extended sample to display detected platform.
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2014-11-20 15:08:31 +00:00
Brendan Le Foll
75be9992fd
i2c: fix I2c::read() call
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-20 14:10:56 +00:00
Brendan Le Foll
19d7dad364
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 >
2014-11-20 12:03:31 +00:00
Brendan Le Foll
ac02940174
rgblcd.py: update example to use only writeReg()
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-05 11:25:42 +00:00
Brendan Le Foll
2896b05dcd
rgblcd.js: add i2c example similar to python
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-05 11:25:41 +00:00
Brendan Le Foll
d0d0d3ced7
i2c_HMC5883L.c: fix type in i2c buffer
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-11-05 11:25:40 +00:00
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