Private
Public Access
2
0
Commit Graph

56 Commits

Author SHA1 Message Date
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
Brendan Le Foll
fb7da58139 cmake: install examples in ${prefix}/share/maa/examples
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-22 14:26:11 +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
521b6817d7 python: include examples page for sphinx documentation that links to src examples
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-20 15:39:58 +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
5d9fc39ae9 hello_isr.py: fix usage of isr in python example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-16 17:52:06 +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
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
41f619048d spi: added example for use with mcp4261
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-16 14:31:44 +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
e84406d697 cmake: make maa link against pthreads directly
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-15 16:40:40 +01:00
Brendan Le Foll
8460b1f743 blink-io: make sure maa_gpio_init was successful
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-15 10:41:23 +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
9eb87fc665 blink-io: add stdlib.h for strtol call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-13 22:24:48 +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
Brendan Le Foll
aa60cae49d maajs: fix example with object API
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-08 11:24:13 +01:00
Brendan Le Foll
83a5e6cde8 maa.i: maa_init is now done after swig initialisation routine
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-07 17:39:58 +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
91e37a7982 analogin_a0: add adc_value print in decimal
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-07 14:20:37 +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
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
Brendan Le Foll
3e0d0c8241 python: fix examples and add maa_init() call in swig
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-02 14:08:49 +01:00
Thomas Ingleby
17a72cf5be Merge branch 'pinmap-aio' 2014-05-02 11:56:02 +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
Brendan Le Foll
4b7f1ff4c5 blink-io8.c: add unistd.h and fix fprintf statement
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-05-02 10:55:45 +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
ea81a0ba75 examples: Update examples to use newer maa functions
* Use maa_init() before any other maa functions are called
* Use ioNN instead of gpioXX, Using mapping

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-05-01 17:08:54 +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
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
ac995a8803 example: blink-io8.c Updated against new API
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-29 17:01:42 +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
Brendan Le Foll
ed0a1f6085 maa: change the linking of maa and make gpio functions match maa_ spec
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-27 23:11:31 +01:00
Brendan Le Foll
a5a407e4b5 MAA version 0.2.0 moves to a standard C API
* Removed all C++ code and renamed all .cxx extensions to .c
* All functions are renamed to maa_ and modules are for example called maa_pwm
* Cmake can now 'make doc' using a Doxyfile.in to create documentation
* examples/ have been updated but swig generated API is untested

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-27 21:17:54 +01:00
Brendan Le Foll
a0efbec625 hello_gpio.py: fix python example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-25 09:10:27 +01:00
Brendan Le Foll
184b94e9e5 examples: make C++ examples follow src/ extension convention
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-22 15:54:34 +01:00
Brendan Le Foll
aee2087a42 maa: general licensing + styling cleanup
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-22 15:51:28 +01:00
Brendan Le Foll
f011102ce6 basic HMC5883L magnometer sample
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-04-22 15:32:22 +01:00
Thomas Ingleby
36a15d5ed5 Merge branch 'pwm' into for-pull 2014-04-14 17:16:30 +01:00
Thomas Ingleby
53b521e864 Merge branch 'gpio' into for-pull 2014-04-14 17:15:55 +01:00
Thomas Ingleby
2d074c2ca3 pwm: Added python example script
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-14 17:07:24 +01:00
Thomas Ingleby
fbd863ca39 pwm: Fully Functional.
* C++ example included

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-14 16:55:19 +01:00
Thomas Ingleby
40438d709a gpio: Add cpp example to use IO.
* Patch direction setting

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-04-11 17:57:53 +01:00