Private
Public Access
2
0
Commit Graph

680 Commits

Author SHA1 Message Date
Brendan Le Foll
76ffa35cec mraa.c: stop C constructor calling mraa_init() in SWIG builds
Closes #65

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-01 10:22:14 +00:00
Brendan Le Foll
10f450b3f6 x86.c: unknown init now returns MRAA_UNKNOWN_PLATFORM
This stops the legacy beahviour that was to initialise as a gen1 galileo if we
failed to find a valid dmi name. Closes #142

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-03-01 10:12:06 +00:00
Brendan Le Foll
3b3b940000 spi.h: fix docstring style
Function doc should not start on comment start line since every other header
doesn't do it

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
415c369e15 contributing.md: amend project contribution goals
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
2755c571ff edison.md: add some SPI limitations
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:54:23 +00:00
Brendan Le Foll
a747c80f63 spi: styling & docstring fix
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:17:04 +00:00
Brendan Le Foll
bd9eeb11ab spi.c: change spi mode to a uint32_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-27 16:14:19 +00:00
Brendan Le Foll
64f377cdfc mraa: update to API version 0.6.1
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-26 09:39:48 +00:00
Brendan Le Foll
a2220e3636 python-mraa.i: ValueError when expecting bytearray but dont get it
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-25 19:23:25 +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
efdbf4b0a8 common: add C++ init() call and explain reason to call again
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-25 15:44:06 +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
Jon Trulson
9d80b12521 gpio.c: change check to allow fd 0
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-20 13:36:47 +00:00
Jon Trulson
ee05b49ea2 gpio.c: check fd before attempting to use it
mraa_gpio_wait_interrupt needs to check fd before using it

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-20 13:35:34 +00:00
Jon Trulson
dd807308ac uart.c: mraa_uart_get_dev_path return NULL on error
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-02-19 10:48:02 +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
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