Private
Public Access
2
0
Commit Graph

65 Commits

Author SHA1 Message Date
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
Brendan Le Foll
09cec0931b swig: add unexport() calls to be used by destructors in object api
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-02 16:33:36 +01:00
Thomas Ingleby
64d3c78ca9 i2c: Work started on using pinmap with i2c
* Update examples and swig interface.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-02 16:07:18 +01:00
Thomas Ingleby
82d3615f6c pinmap: Added spi and i2c to board definition.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-02 14:45:24 +01:00
Thomas Ingleby
a8661e599c i2c: generalising api
* Added raw init function (maa_i2c_init_raw) for not using pinmap

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-02 14:24:08 +01:00
Thomas Ingleby
e68a420f0a i2c: removed gpio from context
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-02 13:53:20 +01:00
Thomas Ingleby
fd1c1c80f4 pinmap: Added aio support.
* Intel Galileo Rev D: Added analog information
* maa_check_aio, similar to maa_check_gpio, will setup multiplexers.
* aio: Removed now duplicated functionality.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-02 11:52:40 +01:00
Thomas Ingleby
be92ed306d Merge branch 'pinmap'
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>

Conflicts:
	api/maa.h
	src/CMakeLists.txt
2014-05-01 17:37:56 +01:00
Thomas Ingleby
e96df16f75 pinmap: GPIO pin map added.
* maa_gpio_init can take the IO number read physically off the board.
* maa_check_gpio will also set up mutiplexers if needed
* Intel Galileo Rev D board data added

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-01 16:55:23 +01:00
Nandkishor Sonar
207c54a5e7 aio: add initial analog input support
Signed-off-by: Nandkishor Sonar <nandkishor.sonar@intel.com>
Reviewed-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-01 16:38:17 +01:00
Brendan Le Foll
4129d4e16d spi: add destructor
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-01 16:11:16 +01:00
Brendan Le Foll
ffe8487d9f add emum doc to maa_result_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-01 15:26:39 +01:00
Brendan Le Foll
661f7b29ec Merge branch 'spi-new' of github.com:tingleby/maa into tingleby-spi-new
Conflicts:
	src/CMakeLists.txt
2014-04-30 14:53:21 +01:00
Brendan Le Foll
35c98aed6d api: Change api licensing as it now has nothing to do with mbed
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-30 14:50:01 +01:00
Thomas Ingleby
e04d776c95 spi: Add initial SPI api
* Skeleton implementation included too.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-30 14:43:59 +01:00
Brendan Le Foll
9e3e322fff gpio.h: fix doxygen comment on struct
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-30 11:36:02 +01:00
Brendan Le Foll
e86916ab91 i2c: add doxygen documentation and make return types use maa_result_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-30 11:35:29 +01:00
Thomas Ingleby
d4427ec35e pinmap: More work around abstracting pin information
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-30 11:13:36 +01:00
Thomas Ingleby
ccc4544455 pwm: Updated API
* Greater use of maa_result_t
* Added raw mode.
* Updated cycle-pwm3 to use new api.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-30 10:30:56 +01:00
Thomas Ingleby
da27e37a4c pinmap: Defining pindata structures
* Logic for setting up required multiplexers

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-30 09:30:59 +01:00
Brendan Le Foll
804c4a437d javascript: fix swig generation of node.js api
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-29 18:44:09 +01:00
Brendan Le Foll
7524cb7ab8 Merge pull request #5 from tingleby/master
gpio: API cleaner & documentation fixed
2014-04-29 17:18:14 +01:00
Thomas Ingleby
226c6bcb66 gpio: Matured the GPIO API.
* Greater use of return values.
* Uses defined enum instead of char arrays

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-29 16:46:10 +01:00
Brendan Le Foll
dc68f40a26 pydoc: add full generation of pydoc for pymaa
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-29 16:33:59 +01:00
Brendan Le Foll
77ee9ffff5 doc: initial documentation of api
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-28 18:39:07 +01:00
Brendan Le Foll
f280b3c0f6 maa: change struct names to be more unique and fix allocs
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-28 11:31:53 +01:00
Brendan Le Foll
00fd42b186 version.h: add versioning info from git
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-28 00:29:14 +01:00