maa.i: maa_init is now done after swig initialisation routine
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
import pymaa as maa
|
import pymaa as maa
|
||||||
import time
|
import time
|
||||||
|
|
||||||
maa.init()
|
|
||||||
x = maa.Gpio(8)
|
x = maa.Gpio(8)
|
||||||
x.dir(maa.MAA_GPIO_OUT)
|
x.dir(maa.MAA_GPIO_OUT)
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
import pymaa as maa
|
import pymaa as maa
|
||||||
import time
|
import time
|
||||||
|
|
||||||
maa.init()
|
|
||||||
x = maa.PWM(0,3)
|
x = maa.PWM(0,3)
|
||||||
x.enable(1);
|
x.enable(1);
|
||||||
x.period_us(20)
|
x.period_us(20)
|
||||||
|
|||||||
@@ -24,6 +24,5 @@
|
|||||||
|
|
||||||
import pymaa
|
import pymaa
|
||||||
|
|
||||||
pumaa.init()
|
|
||||||
x = pymaa.Gpio(13)
|
x = pymaa.Gpio(13)
|
||||||
print(x.pin)
|
print(x.pin)
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
import pymaa as maa
|
import pymaa as maa
|
||||||
|
|
||||||
maa.init()
|
|
||||||
x = maa.I2c()
|
x = maa.I2c()
|
||||||
x.address(0x62)
|
x.address(0x62)
|
||||||
y= " "
|
y= " "
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
#include "aio.h"
|
#include "aio.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
%init %{
|
||||||
|
maa_init();
|
||||||
|
%}
|
||||||
|
|
||||||
%rename(get_version) maa_get_version();
|
%rename(get_version) maa_get_version();
|
||||||
const char * maa_get_version();
|
const char * maa_get_version();
|
||||||
%rename(init) maa_init();
|
|
||||||
int maa_init();
|
|
||||||
|
|
||||||
#### GPIO ####
|
#### GPIO ####
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user