Private
Public Access
2
0

java: Migrate IsrCallbacks to Java's Runnable class

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Petre Eftime
2015-12-16 16:56:38 +02:00
committed by Brendan Le Foll
parent 78a4d12a37
commit c63e38a57e
9 changed files with 104 additions and 37 deletions

View File

@@ -25,7 +25,6 @@
import mraa.Dir;
import mraa.Edge;
import mraa.Gpio;
import mraa.IsrCallback;
public class Isr {
static {
@@ -41,7 +40,7 @@ public class Isr {
public static void main(String argv[]) throws InterruptedException {
Gpio gpio = new Gpio(6);
IsrCallback callback = new JavaCallback();
Runnable callback = new JavaCallback();
gpio.isr(Edge.EDGE_RISING, callback);
while (true)
@@ -49,8 +48,6 @@ public class Isr {
};
}
class JavaCallback extends IsrCallback {
public JavaCallback() { super(); }
class JavaCallback extends Runnable {
public void run() { System.out.println("JavaCallback.run()"); }
}