Brendan Le Foll
3d10fc1c0d
gpio.c: PyEval_Call now casts void* to PyObject* before call, fixing warning
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-19 10:35:29 +01:00
Brendan Le Foll
045b704063
gpio: fix use of memset sizeof param
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-16 14:44:04 +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
6dc1500f5a
gpio: make isr_exit function use pthread_cancel and treat error cases more cleanly
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-15 14:42:44 +01:00
Brendan Le Foll
6811fe4a24
gpio: add signal type to pthread_kill
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 22:18:46 +00:00
Brendan Le Foll
b7d38a22e8
gpio: fix compiler warning with blank return
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-13 21:57:28 +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
Brendan Le Foll
356c7afacd
gpio: don't do a pthread_kill if thread id is 0
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-07 17:45:02 +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
ecc2c92027
gpio: only call ferror in free() case as dev has already been free'd by swig code
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-06 18:12:53 +01:00
Brendan Le Foll
8c9650caa3
gpio: reworking of gpio IO calls
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-06 09:32:07 +01:00
Brendan Le Foll
60c90be693
gpio: use strtol instead of atoi
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-05-02 16:33:36 +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
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
Thomas Ingleby
0c0633e724
gpio: Add support for setting GPIO ouput drive.
...
*Supports all exposed to sysfs
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-29 16:55:54 +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
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
04017cd5d9
gpio.c: fix styling of functions
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-04-23 09:30:27 +01:00
Brendan Le Foll
173b81c206
gpio.c: simplify gpio_get_valfp and make static
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-04-23 09:28:04 +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
791c4b4d71
gpio: Tempory fix when changing direction
...
* Added unexport feature
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-14 17:13:31 +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
Thomas Ingleby
e64ffcf77d
gpio: gpio in/out both work
...
* Python example included.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-11 15:55:01 +01:00
Thomas Ingleby
6d13a41c96
gpio: get file handle if none exists
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-11 13:33:46 +01:00
Thomas Ingleby
aa2ed728be
gpio: work done to export,read,write to gpio
...
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-11 11:41:48 +01:00
Thomas Ingleby
5168538894
gpio: modified api to include close.
...
Add file descriptor to gpio_t
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com >
2014-04-11 09:05:04 +01:00
Brendan Le Foll
e59b8b2038
gpio: enable very basic gpio control from swig
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-04-10 18:00:57 +01:00
Brendan Le Foll
72f249fce1
gpio: cleanup of initial gpio work and add to CMakeLists.txt
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2014-04-10 16:59:17 +01:00
Thomas Ingleby
9556b12e9d
gpio: gpio header refined and work on implemtation
2014-04-10 16:05:11 +01:00
Thomas Ingleby
0cf2aa573b
gpio: add initial gpio header
2014-04-10 15:33:32 +01:00