Private
Public Access
2
0
Commit Graph

37 Commits

Author SHA1 Message Date
Nicolas Oliver
e0a1862ce3 Travis CI and Documentation Generation improvements
* Use docker images from docker hub instead of building them on Travis
* Fix doxygen warnings for C/C++ Documentation
* Fix examples inclusion in documentation
* Modify Travis build matrix to include stages and additional jobs
* Update doxygen2jsdoc submodule
* Add doxyport submodule
* Generate documentation for each language in Travis
* Add sonar.java.binaries to sonar-scan.sh

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
2017-08-10 10:47:11 -03:00
Alex Tereschenko
c36e4add5a examples: make main loops finite to ensure proper cleanup
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-06 15:52:48 +02:00
Alex Tereschenko
32340f6819 examples: misc static code analysis fixes
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-06-06 15:52:48 +02:00
Jon Trulson
e38630097e UartOW.cpp example: Use .data() string accessor instead of .c_str().
.c_str() works accidentally, but is technically incorrect as these
"strings" can have embedded 0 bytes in them.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2017-01-19 08:04:45 +00:00
Houman Brinjcargorabi
b5b84c6186 examples: Added examples for initio by description
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-06-27 11:46:24 +01:00
Brendan Le Foll
4a52ad6c4f uart_ow: Make onewire functionality optional but on by default
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-04-14 13:52:09 +01:00
Jon Trulson
a379eb7bf6 uart_ow: Initial support for Dallas 1-wire over UART support for MRAA
This commit introduces support for Dallas Semiconductor (DS) 1-wire
compliant device support using an available UART device.

The principle of operation is described in the following Application
note by Maxim Electronics:

https://www.maximintegrated.com/en/app-notes/index.mvp/id/214

with help (1-wire search) from:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/187

It has been tested on Galileo 2 and Edison, with 2 DS 1-wire devices,
the DS18B20 and DS2413 connected to the bus.  A UPM driver for the
DS2413 is already complete and a PR will be submitted after this one.

It is important that you use a UART with CMOS/TTL level voltages
(3.3v/5v) RX and TX lines.  DO NOT use standard RS232 level voltages
or you are going to have a bad day.

In order for this to work, a simple interface circuit, using a single
diode must be constructed:

(forgive my "Asciihematic" :)

-|
U|
A| TX---|<--+
R|          |
T| RX-------o--------o 1-wire data bus
-|

The diode on TX is a 1N4148 (cheap and common), with the cathode
connected to TX, and the anode connected to RX and the 1-wire data
line.

The 1-wire data line requires a pull-up resistor, as the DS 1-wire
spec requires. 4.7-5K is typical for DS 1-wire buses.

NOTE: DHT-type (temp/humidity sensor) 1-wire devices ARE NOT DS 1-wire
compliant, and will not work with this code/circuit unfortunately.

Also note, this will use up one of your UARTs, which cannot be used
for any other purpose (ie: to access true UART-type serial devices).

You can however, connect as many DS 1-wire devices as feasible to this
UART, as it will function as a DS 1-wire bus master.

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-04-14 13:41:31 +01:00
Brendan Le Foll
1f57c6c082 Blink-IO.cpp: fix dual include of stdlib for no reason
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-02-09 16:04:14 +00:00
Pieterjan Camerlynck
a87a104efe CMakeLists.txt: do not require a C++ compiler
By default, CMake assumes both a C and C++ compiler are required.
This is not needed for mraa because it only provides C++ header
files. Note that if using SWIG you need one and if using node.js 3+ you'll need
a C++11 compiler

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2016-01-06 10:42:40 +00:00
Brendan Le Foll
8862ebd9f2 mraa: Remove trailing whitespace/tabs from various parts
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-21 15:27:15 +00:00
Henry Bruce
8e4a809f12 iio: C API changes and C++ API enhancements
- C API read/write integer functions changed to int to match C types
- C API now has close function to release resources acquired during init
- iio internal type isr_event() function now has args param in signature
- C++ API now supports events with handler interface and new data structure
- C and C++ examples updated to use API changes

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-12-15 10:42:14 +00:00
Henry Bruce
3429b5383d examples: Converted iio dummy driver test app to C++
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
2015-12-15 10:42:06 +00:00
Brendan Le Foll
08fe460772 Isr-pin6.cpp: Add example for c++ isr
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-09-29 14:23:39 +01:00
Petre Eftime
3934897864 mraa: Add types.hpp; Use types.hpp for C++ and SWIG
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-09-08 14:54:28 +01:00
Brendan Le Foll
359cad0336 uart: Add c++ uart example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-06-02 08:43:14 +01: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
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
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
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
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
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
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
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
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
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
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
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
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
554505b640 aio.hpp: Add C++ wrapper around Aio
* maa_aio_context becomes an opaque pointer
* C++ wrapper class Aio created
* examples/c++ with a sample for Aio created
* swig now uses C++ wrapper Aio to generate an API
* python generated code is now C++

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-16 14:31:30 +01:00