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
Brendan Le Foll
008184c305
nodejs: Add isr support to node.js
...
This commit adds isr support to node.js mraa module, it also forces
SWIGJAVASCRIPT to be set at compile time by cmake (SWIG uses SWIGJAVASCRIPT and
not SWIGNODE in it's preprocessor). This uses libuv uv_queue_work to call v8isr
and is all done at a C++ level unlike the python isr, so this reuses the
mraa_gpio_isr call. This closes #110
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-18 16:41:01 +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
921e27ac22
spi.hpp: Fix indentation of comment
...
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
55ac2e8996
spi: Add 16bit wide convenience functions for spi
...
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
3a5b992524
spi.c: Initialization of spi is necessary on Beaglebone Black
...
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
Brendan Le Foll
78fe6f4270
docs/galileorevd.md: add doc for pin13 on gen1
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-17 14:40:06 +00:00
Brendan Le Foll
cd36880f34
mraa: update to API version 0.6.0
...
Note that v0.6.0 is in the branch with the same name, so this commit is not
0.6.0
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 23:08:18 +00:00
Brendan Le Foll
989566bc04
raspberry_pi.md: Update docs to reflect latest rpi changes
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 22:57:24 +00:00
Michael Ring
3597d8a805
arm: added support for all models of Raspbery Pi A/B/A+/B+ & 2B
...
Includes SPI,I2C,GPIO and mmap access to GPIO. This commit removes the _b
suffix to the rpi board file
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 22:50:55 +00:00
Michael Ring
581184d8fd
include/arm/raspberry_pi.h Added pincount defines for all supported devices
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 22:39:56 +00:00
Michael Ring
f9ae045697
api/mraa/types.h renamed enum for raspberry to make it more global
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 22:39:56 +00:00
Michael Ring
8e305a1032
mraa.c added internal helper functions to support globbing and link analysis
...
Signed-off-by: Michael Ring <mail@michael-ring.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 22:38:36 +00:00
yoneken
2965665fee
Add options for nodejs include directory
...
Signed-off-by: Kenta Yonekura <yoneken@ieee.org >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-15 21:15:24 +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
Brendan Le Foll
c1b96680c9
gpio.c: add DEBUG message for owner flag
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 15:40:02 +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
Henry Bruce
7b213b6393
gpio.c: fix spelling in comment
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 15:40:09 +00:00
Henry Bruce
75138c90ce
gpio.c: mraa_gpio_wait_interrupt() now waits for subsequent interrupts
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-10 15:39:21 +00:00
Brendan Le Foll
2dc79dde6f
docs: fix some poor spelling & phrasing in docs
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-09 16:40:47 +00:00
Brendan Le Foll
fca0efa254
pwm.hpp: fix pin/chipid order in raw init
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-09 16:40:09 +00:00
Thomas Ingleby
459ecc0c1c
src/mraa.c: mux mapped
...
Don't own gpio of muxes, so it isnt unexported.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-02-05 16:20:09 +00:00
Brendan Le Foll
8ccefe95e5
Revert "setup_mux_mapped: use HIGH/LOW instead"
...
This reverts commit 6c73a8adce as it breaks
galileo gen1 muxing.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-05 15:17:50 +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
Alex Tereschenko
cd6701d604
aio.c: added normalized read returning a float in a 0.0-1.0 range
...
Closes #32 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-04 18:22:20 +00:00
Tanu Kaskinen
dbc64fbe86
minnow_max.md: work around bad rendering in GitHub
...
If a line starts with '#', GitHub will show the line as a heading.
That may be a GitHub bug (I'm not sure what the Markdown spec says
about this), but anyway, let's rewrap the text so that GitHub shows
the text as intended.
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-02-04 14:12:27 +00:00
Brendan Le Foll
baa1a0ae03
mraa.c: Allow running mraa_init() as non root
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-31 09:26:24 +00:00
Brendan Le Foll
019b0a5e7e
gpio.c: add pin number to export fail message
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-28 13:00:20 +00:00
Brendan Le Foll
4d81fec6c9
intel_minnow_max.c: define gpio.mux_total
...
Not defining this causes undefined behaviour leading to the check mux_total
sometimes being true and asking the kernel to export all sorts of garbage gpio
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-27 14:12:06 +00:00
Alex Tereschenko
e68546ad85
x86.c/mraa_x86_platform: added dedicated block for Galileo Gen1 init
...
Closes #99 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-26 15:16:32 +00:00
Alex Tereschenko
82bb1c573d
mraa: we now log version and user ID into syslog upon init
...
Closes #98 .
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com >
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-26 15:09:47 +00:00
Thomas Ingleby
6c73a8adce
setup_mux_mapped: use HIGH/LOW instead
...
Avoids on some platforms where when setting a mux will set it low when
it wouldn't be safe to.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-22 17:40:16 +00:00
Thomas Ingleby
e76d85eade
gpio: add behaviour for pin without direction
...
If a gpio doesnt have a direction, like some muxes do, try and set value
if HIGH or LOW was passed.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-22 17:40:16 +00:00
Petrus J.v.Rensburg
d88da134af
contributing.md: Fix typo
...
Signed-off-by: Petrus J.v.Rensburg <petrus.jvrensburg@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-22 10:52:20 +00:00
Thomas Ingleby
212be299fd
api: remove internal strut from public API
...
Moved for internal use only
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 16:33:00 +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
Thomas Ingleby
fb54307939
raspberry_pi_b: add missing platform name
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 15:43:27 +00:00
Thomas Ingleby
e8bc227a92
api/platform_name: Change return when null platform
...
Easier to error check against
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 15:39:29 +00:00
Thomas Ingleby
53a9a7dce4
internal/platform_name: move to const char*
...
Instead of plain char* to avoid need to malloc and do all the needed
error checking needed that goes along with that.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 15:35:54 +00:00
Thomas Ingleby
067487f9ec
mraa/platform: add mraa_get_pin_count()
...
Will return physical pin count.
Closes #75
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-21 15:17:34 +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
e23325d9dd
docs: add debugging doc
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-20 23:25:39 +00:00
Thomas Ingleby
c3980c217c
gpio: add function to get raw gpio number.
...
Will return the GPIO number used within SYSFS
Closes #63
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-20 18:33:12 +00:00
Brendan Le Foll
4e5991779a
cov: add some explicit includes that where missing
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-20 17:15:13 +00:00
Brendan Le Foll
e3dba949b6
i2c.c: Fix resource leak when I2C_FUNCS ioctl fails
...
This isn't a true failure condition just assume we have no features and carry
on
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-01-20 17:15:13 +00:00
Thomas Ingleby
25bd897ec5
uart: use const char* instead of plain char*
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-20 17:14:12 +00:00
Thomas Ingleby
9cfbc87924
uart: add function mraa_uart_get_dev_path
...
Used for getting the path to the character device under linux for uart
device. i.e. "/dev/ttyS0"
Adds paths to existing platforms.
Closes #84
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2015-01-20 16:08:49 +00:00