Private
Public Access
2
0

gpio: Added args param to maa_gpio_isr and added documentation

Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
Kiveisha Yevgeniy
2014-06-19 16:23:43 +00:00
parent 93acdf3789
commit 6fbe2a7e53
5 changed files with 38 additions and 16 deletions

View File

@@ -29,7 +29,7 @@
static volatile int counter = 0;
static volatile int oldcounter = 0;
void interrupt (void) {
void interrupt (void * args) {
++counter;
}
@@ -47,7 +47,7 @@ int main ()
gpio_edge_t edge = MAA_GPIO_EDGE_BOTH;
maa_gpio_isr(x, edge, &interrupt);
maa_gpio_isr(x, edge, &interrupt, NULL);
for(;;) {
if(counter != oldcounter) {

View File

@@ -2,9 +2,9 @@
import pymaa as maa
def test():
def test(args):
print("wooo")
x = maa.Gpio(6)
x.dir(maa.DIR_IN)
x.isr(maa.EDGE_BOTH, test)
x.isr(maa.EDGE_BOTH, test, test)