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:
@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user