Package org.deepjava.flink.core
Class FlinkDevice
- java.lang.Object
-
- org.deepjava.flink.core.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.
-
-
Field Summary
-
Fields inherited from interface org.deepjava.flink.core.FlinkDefinitions
ANALOG_INPUT_INTERFACE_ID, ANALOG_OUTPUT_INTERFACE_ID, CHANNEL_OFFSET, COUNTER_INTERFACE_ID, GPIO_INTERFACE_ID, HEADER_SIZE, INFO_DEVICE_ID, INFO_DEVICE_SIZE, INTERFACE_TYPE_MASK, MOD_CONF_OFFSET, MOD_STATUS_OFFSET, PPWA_INTERFACE_ID, PWM_INTERFACE_ID, REGISTER_WIDTH, REGISTER_WIDTH_BIT, SIZE_OFFSET, SUBHEADER_SIZE, TOTAL_HEADER_SIZE, TYPE_OFFSET, UART_INTERFACE_ID, UNIQUE_ID_OFFSET, WD_INTERFACE_ID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FlinkDAC
getAD5668()
Returns aFlinkDAC
subdevice with subtype 0 if present in this flink device.static FlinkADC
getAD7476()
Returns aFlinkADC
subdevice with subtype 3 if present in this flink device.static FlinkADC
getAD7606()
Returns aFlinkADC
subdevice with subtype 2 if present in this flink device.static FlinkADC
getADC128S102()
Returns aFlinkADC
subdevice with subtype 1 if present in this flink device.static FlinkCounter
getCounter()
Returns aFlinkCounter
subdevice if present in this flink device.FlinkSubDevice[]
getDeviceList()
A flink device incorporates one or several subdevices.static FlinkGPIO
getGPIO()
Returns aFlinkGPIO
subdevice if present in this flink device.static FlinkInfo
getInfo()
Returns aFlinkInfo
subdevice if present in this flink device.static FlinkDevice
getInstance()
Returns an flink device.int
getNumberOfSubDevices()
A flink device incorporates one or several subdevices.static FlinkPPWA
getPPWA()
Returns aFlinkPPWA
subdevice if present in this flink device.static FlinkPWM
getPWM()
Returns aFlinkPWM
subdevice if present in this flink device.FlinkSubDevice
getSubdeviceByNr(int nr)
A flink device incorporates one or several subdevices.FlinkSubDevice
getSubdeviceByType(int type)
A flink device incorporates one or several subdevices.FlinkSubDevice
getSubdeviceByType(int type, int subType)
A flink device incorporates one or several subdevices.FlinkSubDevice
getSubdeviceByUniqueID(int id)
A flink device incorporates one or several subdevices.static FlinkUART
getUART(int uartNr)
Returns an instance ofFlinkUART
subdevice if present in this flink device.static FlinkWatchdog
getWatchdog()
Returns aFlinkWatchdog
subdevice if present in this flink device.static String
idToCharArray(int id)
Use this method to return a string which describes the function of a subdevice.void
lsflink()
Prints the content of a flink device with all its subdevices on System.out.
-
-
-
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 subdevicesubType
- 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 aFlinkPWM
subdevice if present in this flink device.- Returns:
- pwm subdevice, null if not available
-
getCounter
public static FlinkCounter getCounter()
Returns aFlinkCounter
subdevice if present in this flink device.- Returns:
- counter subdevice, null if not available
-
getInfo
public static FlinkInfo getInfo()
Returns aFlinkInfo
subdevice if present in this flink device.- Returns:
- info subdevice, null if not available
-
getGPIO
public static FlinkGPIO getGPIO()
Returns aFlinkGPIO
subdevice if present in this flink device.- Returns:
- gpio subdevice, null if not available
-
getPPWA
public static FlinkPPWA getPPWA()
Returns aFlinkPPWA
subdevice if present in this flink device.- Returns:
- ppwa subdevice, null if not available
-
getADC128S102
public static FlinkADC getADC128S102()
Returns aFlinkADC
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 aFlinkADC
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 aFlinkADC
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 aFlinkDAC
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 aFlinkWatchdog
subdevice if present in this flink device.- Returns:
- watchdog subdevice, null if not available
-
-