Private
Public Access
2
0
Commit Graph

12 Commits

Author SHA1 Message Date
Manivannan Sadhasivam
e562c774cf examples: cleanup examples directory
Following changes are done as a part of cleanup:

1. Moved the platform specific `C` examples from top level examples/
directory to platform/ subdirectory and renamed helloedison.c to
gpio_edison.c

2. C specific examples are moved to a new c/ subdirectory. As a part
of this process, examples are modified to follow same standards
and few new examples are also added.

3. Include the newly added C examples to relevant API documentation

4. Ran clang-format for all source files in c/, c++/, platform/
subdirectories

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2018-01-18 14:12:08 +01:00
Noel Eck
1217c5c034 examples: Remove heap allocation from C++ examples
Small cleanup of MRAA C++ examples.  Switched from heap allocation to
stack allocation when possible.  This simplifies the samples since it
removes the need for explicit memory management.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-08-23 14:49:12 -07: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
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
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
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
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
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
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
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