FTD2XX.jl is a thin wrapper for FTDI's D2XX driver.
##Installation
FTD2XX.jl is currently unregistered. It can be installed using Pkg.clone.
Pkg.clone("https://github.com/cstook/FTD2XX.jl.git")The julia documentation section on installing unregistered packages provides more information.
The UART may be accessed as type IOftuart <: IO
get information about devices
device_infomation_list = ft_getdeviceinfolist()open a device.
io = open(FT_SerialNumber("FTXRNZUJ"),9600,8,1,"n") # open by serial numberor
io = open(FT_Description("C232HM-EDHSL-0"),9600,8,1,"n") # open by descriptionor
io = open(FT_Location(0x000001a2),9600,8,1,"n") # open by locationor
io = open(FT_DeviceIndex(0),9600,8,1,"n") # open by device indexor
uartconfig = UARTConfiguration(9600,8,1,"n",
readtimeout = 1000, # in milliseconds
writetimeout = 1000, # in milliseconds
flowcontrol = "none", # none, rts_cts, dtr_dsr, xon_xoff
xon = 0x11,
xoff = 0x13)
io = open(FT_DeviceIndex(0),uartconfig)use all the normal IO functions
write(io, 0x55)
byteread = read(io, UInt8)close the device
close(io)D2XX Programmer's Guide (from FTDI)
##OS Compatibility
FTD2XX.jl is compatible with windows, linux, and osx. See FTDI's installation guides for instructions on installing drivers for your operating system. Drivers are assumed to be installed in the default locations.
Additional Information for Linux
I2C as an array.
SPI, JTAG as readdata = writeread(datatowrite)