Package org.deepjava.runtime
Class Kernel
- java.lang.Object
-
- org.deepjava.runtime.Kernel
-
public abstract class Kernel extends Object
Mock kernel. The class file reader will replace this class by the proper kernel class, which is set in the configuration.
-
-
Constructor Summary
Constructors Constructor Description Kernel()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
blink(int i)
Blinks a led on a hardware pin a specified number of times.static void
enableInterrupts()
Enables interrupts globally.static long
timeNs()
Reads the system time.static long
timeUs()
Reads the system time.
-
-
-
Field Detail
-
loopAddr
public static int loopAddr
Address of the main loop. This address must be set by the kernel or a specific scheduler to a method containing an infinite loop.
-
cmdAddr
public static int cmdAddr
Address of a target command. A target command is a parameter-less method which can be called by the host through a debugger. This method is inserted into the regular schedule and run once.
-
-
Method Detail
-
timeUs
public static long timeUs()
Reads the system time.- Returns:
- System time in µs
-
timeNs
public static long timeNs()
Reads the system time.- Returns:
- System time in ns
-
blink
public static void blink(int i)
Blinks a led on a hardware pin a specified number of times.- Parameters:
i
- Number of times the led blinks.
-
enableInterrupts
public static void enableInterrupts()
Enables interrupts globally. Individual interrupts for peripheral components must be enabled locally.
-
-