Private
Public Access
2
0
Commit Graph

110 Commits

Author SHA1 Message Date
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
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