Brendan Le Foll
0fe7bd335c
src: add unistd.h to pwm and spi modules to remove compiler warnings
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-22 14:54:19 +01:00
Brendan Le Foll
55403793e3
pwm: equality comparison should be assignment
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-22 14:53:18 +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
7cc5d6b2b8
pwm: fix writing of period
...
Incorrect value attempted to be written
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-05-21 14:49:32 +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
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
Thomas Ingleby
fa7180cb91
pwm: use posix open instead of fopen
...
* Add safety to output char arrays and filepaths.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-20 10:57:20 +01:00
Thomas Ingleby
0c82a47fe4
pwm: changed to use strtol for return values.
...
* Minor spelling corrections
* Small format change in function. Incorrect spacing.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:49:41 +01:00
Thomas Ingleby
6333a21c6f
pwm: removed disabling pin on unexport.
...
Needed to be handled differently based on the running platform
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:49:36 +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
5141d24565
pwm: always return a value if stated in prototype
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:18:22 +00: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
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
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
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
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
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
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
5c2235dc0c
pwm: Completed functions:
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-14 14:40:40 +01:00
Thomas Ingleby
cb92c892cf
pwm: Refined API. Work towards functionality
...
* Private functions added
* Added to CMakeLists
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-14 13:10:53 +01:00