Brendan Le Foll
9b6d67aa87
i2c.hpp: add read(size_t length) function useful in scripting languages
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-31 10:14:57 +02:00
Brendan Le Foll
3925724464
i2c.hpp: overload read() function, this renames readByte
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-31 10:14:22 +02: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
Thomas Ingleby
23304fb6c4
uart: barebones uart module added.
...
* Only defined call is the init. Will then expose the uart from
* the multiplexors.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-10 01:09:46 +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
Thomas Ingleby
2cb2122fa1
types.h: add missing asterix from comment.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-02 17:10:59 +01:00
Thomas Ingleby
053d9aef70
mraa: add common hpp
...
* Wraps some of the C functions that libmraa has into the mraa namespace
* Not included in swig bindings as of yet
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-07-02 17:09:34 +01:00
Brendan Le Foll
eec08ac97b
mraa.c: stop ctor running in scripting languages
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-07-01 17:05:57 +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
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
Thomas Ingleby
e5c7e64cf3
aio: added configuration within platform data.
...
* Allows for different bit shifting for each platform.
* New functions added for obtaining this information
* mraa_adc_raw_bits
* mraa_adc_supported_bits
* Update board information to include this. AIO module changed to allow
* use of the new board data
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-06-25 17:32:41 +01:00
Thomas Ingleby
09b8663a7e
gpio: add mmap enable function to cpp headers
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-06-25 11:14:20 +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
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
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
Thomas Ingleby
fa4a302398
maa: add support for enabling pins and pulldowns
...
* Not Complete
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-06-17 20:15:36 +01:00
Brendan Le Foll
27624289ec
gen2: add basic galileo gen2 detection
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-16 18:46:31 +01:00
Brendan Le Foll
4a0c76c1a0
spi.h: add doc to make sure people free the returned buffer after maa_spi_write
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-13 17:52:59 +01:00
Brendan Le Foll
6e4f8b085f
maa: make common.h header to replace maa.h header to simplify includes
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-11 14:28:28 +01:00
Brendan Le Foll
ab071e64de
i2c: make maa_i2c_read always return the length of the read
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-11 10:49:23 +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
6cd3cb4c65
maa: add maa_set_priority call
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-06-04 14:39:41 +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
Brendan Le Foll
a02923beec
docs: Add docs/ folder with in depth topics as well as DoxygenLayout.xml file
...
* C headers now have @briefs and include examples
* Examples have altered 'Interesting' Sections
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-29 14:51:38 +01:00
Brendan Le Foll
024324f76e
c++: Use simple types instead of unistd types for swig generation
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-28 10:58:27 +01:00
Brendan Le Foll
679ec0a139
aio.hpp: read() uses basic type to make generation of swig interfaces easier
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-27 10:38:56 +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
Thomas Ingleby
a2c7eb5458
pwm: made export functions static
...
* removed functions from external api also.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-21 14:56:11 +01:00
Thomas Ingleby
98800a5c76
gpio: made export functions static.
...
* removed functions from api also
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-21 14:55:14 +01:00
Thomas Ingleby
2b8ab38418
maa: hide and rename internal maa functions
...
Based on feedback received. All check functions renamed to setup.
Update all modules to use new name and header.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-21 13:17:16 +01:00
Thomas Ingleby
0813271423
spi: fix headers
...
Missed in earlier commits
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-21 13:07:50 +01:00
Thomas Ingleby
a8d7473a5b
spi: completed implementation.
...
* Added more functions for transaction settings.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-21 09:50:28 +01:00
Thomas Ingleby
66550f9487
spi: Use new feature of pinmap to get split info.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-21 09:50:24 +01:00
Thomas Ingleby
b7c2b701aa
spi-pinmap: seperated bus from slave select.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-21 09:50:19 +01:00
Thomas Ingleby
7abd8f5529
gpio: add ownership gaurd
...
* Will not unexport if the context did not export it. Can be forced.
* Checks if pin is already exported.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 14:11:41 +01:00
Thomas Ingleby
5fa6f50edc
pwm: added existing exposition logic
...
* Understands when pwm pin is already exported.
* Will not unexport if didnt export. Can be forced.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 14:07:19 +01:00
Brendan Le Foll
adcefeaba1
i2c: fix write API to use const char*
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:34:36 +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
Brendan Le Foll
d0240cd50a
spi.hpp: Add C++ wrapper around Spi
...
* maa_spi_context becomes an opaque pointer
* C++ wrapper class Spi created
* swig now uses C++ wrapper Gpio to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:46 +01:00
Thomas Ingleby
0c7939a556
spi: changed write function prototype.
...
* Added write_buf for buffer transfer
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:41 +01:00
Thomas Ingleby
352e1e084d
spi-pinmap: added spi checking functions.
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-16 14:31:40 +01:00
Brendan Le Foll
058084cd88
gpio.hpp: Add C++ wrapper around Gpio
...
* maa_gpio_context bcomes an opaque pointer
* C++ wrapper class Gpio created
* swig now uses C++ wrapper Gpio to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:37 +01:00
Brendan Le Foll
f0763844fa
pwm.hpp: Add C++ wrapper around Pwm
...
* maa_pwm_context becomes an opaque pointer
* C++ wrapper class Pwm
* swig now uses C++ wrapper Pwm to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:36 +01:00
Brendan Le Foll
e491f99228
i2c.hpp: Add C++ wrapper around I2c
...
* maa_i2c_context bcomes an opaque pointer
* C++ wrapper class I2c created
* swig now uses C++ wrapper I2c to generate API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:31:33 +01:00