asuro.java

来自「单片机上的java虚拟机 用winavr 编译」· Java 代码 · 共 43 行

JAVA
43
字号
//// nanovm/asuro/Asuro.java//// When converting NanoVM code using the Convert tool, this// code will magically be replaced by native methods. This// code will never be called.//// It is possible to fill this code with e.g. a graphical // representation of the Asuro allowing the Java code to be// run on a PC using a Asuro simulation//package nanovm.asuro;public class Asuro {  public final static int OFF       = 0;  public final static int ON        = 1;  public final static int RED       = 1;  public final static int GREEN     = 2;  public final static int YELLOW    = 3;  public final static int LEFT      = 0;  public final static int RIGHT     = 1;  public final static int ANY       = 0;  public final static int SELECTIVE = 1;  public static native void statusLED(int state);  public static native void wait(int msec);  public static native void motor(int left, int right);  public static native void lineLED(int state);  public static native void backLED(int left, int right);  public static native int lineSensor(int sensor);  public static native int motorSensor(int sensor);  // mode can be "ANY" which returns 1 if any of the switches  // is pressed and 0 if none of them is. or mode can be  // SELECTIVE which returns an _inprecise_ bitmap of the  // single buttons  public static native int getSwitches(int mode);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?