This is a library sourced from the Alchitry Labs site packaged for easy consumption within gradle or maven. It is used to communicate over USB serial in a master/slave configuration to an Alchitry FPGA Board.
It has been tested to work on Windows 10 and should work on OSX with some workarounds.
See Javadocs.
In your build.gradle file:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.chuckstechtalk:RegisterInterface:1.+'
}
Next, import like so:
import com.chuckstechtalk.alchitry.*;Finally, instantiate:
RegisterInterface reg = new RegisterInterface();
reg.connect("COMx", 1000000);
// Write the value 10 to register 1
reg.write(1, 10);This lib uses the jssc serial library and it is automatically included as a dependency, so you should not need to do so in your project. This caveat is here because I am not sure if all native binaries are included in the resulting dist jar. Certainly the on the target in which your app is built, the jars will include the appropriate native binaries.