Private
Public Access
2
0
Commit Graph

91 Commits

Author SHA1 Message Date
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
Brendan Le Foll
9e823b7f1d maa_init: fix constructor attribute in maa_init and add working example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-16 14:31:31 +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
Brendan Le Foll
f185877860 aio: remove _u16 suffix from call. Make return type a uint16_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 22:25:21 +00:00
Brendan Le Foll
4ef5176dad aio: use posix read/lseek API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 21:59:54 +00:00
Brendan Le Foll
ef225dbe26 swig: fix usage of SWIGPYTHON for python specific code
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 20:55:08 +00:00
Brendan Le Foll
f7169cc5c5 swig: Add support for isr/callbacks from python
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 20:47:50 +00:00
Brendan Le Foll
126b1314b0 gpio: rework of gpio - using open() for value_fp
* fixes maa_gpio_read by using simple posix file io
* fixes blink sample to have much more error checking
* blink sample now takes an argument

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 15:35:27 +01:00
Thomas Ingleby
d3bfb25e60 pinmap: function to test mode of a pin.
* Added enum to represent the supported modes.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-07 15:12:44 +01:00
Brendan Le Foll
4b2c8ae510 Merge branch 'master' of github.com:tingleby/maa into tingleby-master 2014-05-07 14:49:53 +01:00
Brendan Le Foll
37b5d9f0cc gpio: initial implementation of interupt handling on gpio
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-07 14:48:21 +01:00
Brendan Le Foll
d82cae1312 aio: add c++ header guards
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-06 15:50:13 +01:00
Thomas Ingleby
019853d2fd maa: add result print function.
* Fixed error in comments in maa.h

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-06 15:33:54 +01:00
Thomas Ingleby
171f66208e pwm: Use pinmap functions for setting up pwm.
* Intended function of check_pwm also checks for conflicting gpio, due
* to quirk on galileo rev d, functionality commented.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-06 15:33:54 +01:00
Brendan Le Foll
5161713eaf init: allow init to be called multiple times
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-06 10:42:06 +01:00
Thomas Ingleby
dd89adc47b pinmap: new way of defining board io.
* Intel Galileo Rev D pinmap updated to use new format

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-05 20:13:03 +01:00
Brendan Le Foll
82aebc27e1 Merge branch 'pinmap-i2cspi' of github.com:tingleby/maa into tingleby-pinmap-i2cspi 2014-05-02 16:43:10 +01:00