Class 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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int cmdAddr
      Address of a target command.
      static int loopAddr
      Address of the main loop.
    • Constructor Summary

      Constructors 
      Constructor Description
      Kernel()  
    • 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.
    • Constructor Detail

      • Kernel

        public Kernel()
    • 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.