public final class SerialComSLabsCP210xRuntime extends SerialComVendorLib
Silicon labs provides libraries to communicate with their USB-UART devices. More information can be found here : https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
Developers are requested to check with vendor library documentation if a particular function is supported for desired platform or not and also how does a particular API will behave. Also consider paying attention to valid values and range when passing arguments to a method.
SerialPundit version 1.0.4 is linked to v3.4.0.0 version of CP210xRuntime library (CP210xRuntime.dll).
| Modifier and Type | Field and Description |
|---|---|
static int |
CP210x_GPIO_0
Bit mask to represent mask and latch definition for GPIO0 in CP210X terminology.
|
static int |
CP210x_GPIO_1
Bit mask to represent mask and latch definition for GPIO1 in CP210X terminology.
|
static int |
CP210x_GPIO_10
Bit mask to represent mask and latch definition for GPIO10 in CP210X terminology.
|
static int |
CP210x_GPIO_11
Bit mask to represent mask and latch definition for GPIO11 in CP210X terminology.
|
static int |
CP210x_GPIO_12
Bit mask to represent mask and latch definition for GPIO12 in CP210X terminology.
|
static int |
CP210x_GPIO_13
Bit mask to represent mask and latch definition for GPIO13 in CP210X terminology.
|
static int |
CP210x_GPIO_14
Bit mask to represent mask and latch definition for GPIO14 in CP210X terminology.
|
static int |
CP210x_GPIO_15
Bit mask to represent mask and latch definition for GPIO15 in CP210X terminology.
|
static int |
CP210x_GPIO_2
Bit mask to represent mask and latch definition for GPIO2 in CP210X terminology.
|
static int |
CP210x_GPIO_3
Bit mask to represent mask and latch definition for GPIO3 in CP210X terminology.
|
static int |
CP210x_GPIO_4
Bit mask to represent mask and latch definition for GPIO4 in CP210X terminology.
|
static int |
CP210x_GPIO_5
Bit mask to represent mask and latch definition for GPIO5 in CP210X terminology.
|
static int |
CP210x_GPIO_6
Bit mask to represent mask and latch definition for GPIO6 in CP210X terminology.
|
static int |
CP210x_GPIO_7
Bit mask to represent mask and latch definition for GPIO7 in CP210X terminology.
|
static int |
CP210x_GPIO_8
Bit mask to represent mask and latch definition for GPIO8 in CP210X terminology.
|
static int |
CP210x_GPIO_9
Bit mask to represent mask and latch definition for GPIO9 in CP210X terminology.
|
VLIB_FTDI_D2XX, VLIB_MCHP_SIMPLEIO, VLIB_SLABS_CP210XMANUFACTURING, VLIB_SLABS_CP210XRUNTIME, VLIB_SLABS_USBXPRESS| Constructor and Description |
|---|
SerialComSLabsCP210xRuntime(File libDirectory,
String vlibName,
int cpuArch,
int osType,
com.serialpundit.core.SerialComSystemProperty serialComSystemProperty)
Allocates a new SerialComSLabsCP210xRuntime object and extract and load shared libraries as
required.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDeviceInterfaceString(long handle)
Executes CP210xRT_GetDeviceInterfaceString function of CP210XRuntime library.
|
String |
getDeviceProductString(long handle)
Executes CP210xRT_GetDeviceProductString function of CP210XRuntime library.
|
String |
getDeviceSerialNumber(long handle)
Executes CP210xRT_GetDeviceSerialNumber function of CP210XRuntime library.
|
String |
getPartNumber(long handle)
Executes CP210xRT_GetPartNumber function of CP210XRuntime library.
|
long |
readLatch(long handle)
Executes CP210xRT_ReadLatch function of CP210XRuntime library.
|
boolean |
writeLatch(long handle,
long mask,
long latchValue)
Executes CP210xRT_WriteLatch function of CP210XRuntime library.
|
getVendorLibInstancepublic static final int CP210x_GPIO_0
Bit mask to represent mask and latch definition for GPIO0 in CP210X terminology.
public static final int CP210x_GPIO_1
Bit mask to represent mask and latch definition for GPIO1 in CP210X terminology.
public static final int CP210x_GPIO_2
Bit mask to represent mask and latch definition for GPIO2 in CP210X terminology.
public static final int CP210x_GPIO_3
Bit mask to represent mask and latch definition for GPIO3 in CP210X terminology.
public static final int CP210x_GPIO_4
Bit mask to represent mask and latch definition for GPIO4 in CP210X terminology.
public static final int CP210x_GPIO_5
Bit mask to represent mask and latch definition for GPIO5 in CP210X terminology.
public static final int CP210x_GPIO_6
Bit mask to represent mask and latch definition for GPIO6 in CP210X terminology.
public static final int CP210x_GPIO_7
Bit mask to represent mask and latch definition for GPIO7 in CP210X terminology.
public static final int CP210x_GPIO_8
Bit mask to represent mask and latch definition for GPIO8 in CP210X terminology.
public static final int CP210x_GPIO_9
Bit mask to represent mask and latch definition for GPIO9 in CP210X terminology.
public static final int CP210x_GPIO_10
Bit mask to represent mask and latch definition for GPIO10 in CP210X terminology.
public static final int CP210x_GPIO_11
Bit mask to represent mask and latch definition for GPIO11 in CP210X terminology.
public static final int CP210x_GPIO_12
Bit mask to represent mask and latch definition for GPIO12 in CP210X terminology.
public static final int CP210x_GPIO_13
Bit mask to represent mask and latch definition for GPIO13 in CP210X terminology.
public static final int CP210x_GPIO_14
Bit mask to represent mask and latch definition for GPIO14 in CP210X terminology.
public static final int CP210x_GPIO_15
Bit mask to represent mask and latch definition for GPIO15 in CP210X terminology.
public SerialComSLabsCP210xRuntime(File libDirectory, String vlibName, int cpuArch, int osType, com.serialpundit.core.SerialComSystemProperty serialComSystemProperty) throws com.serialpundit.core.SerialComException
Allocates a new SerialComSLabsCP210xRuntime object and extract and load shared libraries as required.
libDirectory - directory in which native library will be extracted and vendor library will
be found.vlibName - name of vendor library to load and link.cpuArch - architecture of CPU this library is running on.osType - operating system this library is running on.serialComSystemProperty - instance of SerialComSystemProperty to get required java properties.com.serialpundit.core.SerialComException - if java system properties can not be is null, if any file system related issue occurs.SecurityException - if java system properties can not be accessed or required files can not be accessed.UnsatisfiedLinkError - if loading/linking shared library fails.FileNotFoundException - if the vendor library file is not found.public long readLatch(long handle)
throws com.serialpundit.core.SerialComException
Executes CP210xRT_ReadLatch function of CP210XRuntime library.
Gets the current port latch value from the device.
handle - handle of the opened COM port.com.serialpundit.core.SerialComException - if an I/O error occurs.public boolean writeLatch(long handle,
long mask,
long latchValue)
throws com.serialpundit.core.SerialComException
Executes CP210xRT_WriteLatch function of CP210XRuntime library.
Sets the current port latch value for the device.
handle - handle of the opened COM port.mask - determines which pins to change [Change = 1, Leave = 0].latchValue - bit mask value to write to GPIO latch [Logic High = 1, Logic Low = 0].com.serialpundit.core.SerialComException - if an I/O error occurs.public String getPartNumber(long handle) throws com.serialpundit.core.SerialComException
Executes CP210xRT_GetPartNumber function of CP210XRuntime library.
Gets the part number of the current device.
handle - handle of the opened COM port.com.serialpundit.core.SerialComException - if an I/O error occurs.public String getDeviceProductString(long handle) throws com.serialpundit.core.SerialComException
Executes CP210xRT_GetDeviceProductString function of CP210XRuntime library.
Gets the product string in the current device.
handle - handle of the opened COM port.com.serialpundit.core.SerialComException - if an I/O error occurs.public String getDeviceSerialNumber(long handle) throws com.serialpundit.core.SerialComException
Executes CP210xRT_GetDeviceSerialNumber function of CP210XRuntime library.
Gets the serial number in the current device.
handle - handle of the opened COM port.com.serialpundit.core.SerialComException - if an I/O error occurs.public String getDeviceInterfaceString(long handle) throws com.serialpundit.core.SerialComException
Executes CP210xRT_GetDeviceInterfaceString function of CP210XRuntime library.
Gets the interface string of the current device.
handle - handle of the opened COM port.com.serialpundit.core.SerialComException - if an I/O error occurs.Copyright © 2017. All rights reserved.