Class FlinkDevice

  • All Implemented Interfaces:
    FlinkDefinitions

    public class FlinkDevice
    extends Object
    implements FlinkDefinitions
    A flink device is a hardware configuration in a FPGA device,
    Author:
    Urs Graf
    See Also:
    www.flink-project.ch. It offers a multitude of specific subdevice with unique functionalities.
    • Method Detail

      • getInstance

        public static FlinkDevice getInstance()
        Returns an flink device. The processor reads over a AXI bus interface the content of a flink device implemented in the FPGA hardware. Depending on the configuration of the FPGA various flink subdevices are available.
        Returns:
        flink device
      • getNumberOfSubDevices

        public int getNumberOfSubDevices()
        A flink device incorporates one or several subdevices. Use this method to query the number of subdevices in a flink device.
        Returns:
        number of subdevices
      • getDeviceList

        public FlinkSubDevice[] getDeviceList()
        A flink device incorporates one or several subdevices. Use this method to get a list of all subdevices in a flink device.
        Returns:
        list of subdevices
      • getSubdeviceByNr

        public FlinkSubDevice getSubdeviceByNr​(int nr)
        A flink device incorporates one or several subdevices. This method returns the subdevice with a given number. The sundevices are numbered starting from 0.
        Parameters:
        nr - number of subdevices
        Returns:
        subdevice, null if number not present
      • getSubdeviceByType

        public FlinkSubDevice getSubdeviceByType​(int type,
                                                 int subType)
        A flink device incorporates one or several subdevices. This method returns the subdevice with a given type and subtype.
        Parameters:
        type - type of the subdevice
        subType - subtype of the subdevice
        Returns:
        subdevice, null if type and subtype not present
      • getSubdeviceByType

        public FlinkSubDevice getSubdeviceByType​(int type)
        A flink device incorporates one or several subdevices. This method returns the subdevice with a given type.
        Parameters:
        type - type of the subdevice
        Returns:
        subdevice, null if type not present
      • getSubdeviceByUniqueID

        public FlinkSubDevice getSubdeviceByUniqueID​(int id)
        A flink device incorporates one or several subdevices. This method returns the subdevice with a given unique id.
        Parameters:
        id - unique id of the subdevice
        Returns:
        subdevice, null if unique id not present
      • idToCharArray

        public static String idToCharArray​(int id)
        Use this method to return a string which describes the function of a subdevice.
        Parameters:
        id - type of a subdevice
        Returns:
        string
      • lsflink

        public void lsflink()
        Prints the content of a flink device with all its subdevices on System.out.
      • getPWM

        public static FlinkPWM getPWM()
        Returns a FlinkPWM subdevice if present in this flink device.
        Returns:
        pwm subdevice, null if not available
      • getCounter

        public static FlinkCounter getCounter()
        Returns a FlinkCounter subdevice if present in this flink device.
        Returns:
        counter subdevice, null if not available
      • getInfo

        public static FlinkInfo getInfo()
        Returns a FlinkInfo subdevice if present in this flink device.
        Returns:
        info subdevice, null if not available
      • getGPIO

        public static FlinkGPIO getGPIO()
        Returns a FlinkGPIO subdevice if present in this flink device.
        Returns:
        gpio subdevice, null if not available
      • getPPWA

        public static FlinkPPWA getPPWA()
        Returns a FlinkPPWA subdevice if present in this flink device.
        Returns:
        ppwa subdevice, null if not available
      • getADC128S102

        public static FlinkADC getADC128S102()
        Returns a FlinkADC subdevice with subtype 1 if present in this flink device. Subtype 1 is used for a ADC128S102 device.
        Returns:
        adc subdevice, null if not available
      • getAD7606

        public static FlinkADC getAD7606()
        Returns a FlinkADC subdevice with subtype 2 if present in this flink device. Subtype 2 is used for a AD7606 device.
        Returns:
        adc subdevice, null if not available
      • getAD7476

        public static FlinkADC getAD7476()
        Returns a FlinkADC subdevice with subtype 3 if present in this flink device. Subtype 3 is used for a AD7476 device.
        Returns:
        adc subdevice, null if not available
      • getAD5668

        public static FlinkDAC getAD5668()
        Returns a FlinkDAC subdevice with subtype 0 if present in this flink device. Subtype 3 is used for a AD7476 device.
        Returns:
        adc subdevice, null if not available
      • getWatchdog

        public static FlinkWatchdog getWatchdog()
        Returns a FlinkWatchdog subdevice if present in this flink device.
        Returns:
        watchdog subdevice, null if not available
      • getUART

        public static FlinkUART getUART​(int uartNr)
        Returns an instance of FlinkUART subdevice if present in this flink device.
        Parameters:
        uartNr - uart number such as 0, 1, ..
        Returns:
        uart subdevice, null if not available