![]() |
FrontPanel Programmer's Interface |
The FrontPanel API provides a powerful C++ interface to Opal Kelly USB-based FPGA boards. The library is able to communicate with any Opal Kelly device supported by the USB-FPGA driver, including the XEM3001, XEM3005, and XEM3010.
To build an application using this API, you need to include the file okCUsbFrontPanel.h in files that access the API, and also add the library okFrontPanel.lib to be linked with your project. The library was built under Microsoft Visual Studio .NET (Version 7.1) with the Multi-threaded DLL setting.
To use the library, you create an instance of okCUsbFrontPanel which encapsulates communication with the USB driver and provides access to FrontPanel endpoints. Call GetDeviceCount to determine how many XEMs are attached to the USB. You can use the GetDeviceListXXX methods to determine specific information about the boards attached, then call OpenBySerial to open one of them by referring to its serial number. (If no serial number is provided, this method opens the first available device.)
ConfigureFPGA is used to download a configuration file to the FPGA. Sending data to Wire In endpoints is done with calls to SetWireInValue followed by a call to UpdateWireIns to simultaneously update all Wire Ins. ActivateTriggerIn is used to trigger the XEM.
The API uses polling to query the values of output endpoints such as Wire Outs and Trigger Outs. The methods UpdateWireOuts and UpdateTriggerOuts perform these queries. Once the wire and trigger values have been updated by these methods, you can retrieve the values using the methods GetWireOutValue and IsTriggered.
Version:
$Rev: 555 $
$Date: 2007-10-18 13:14:48 -0700 (Thu, 18 Oct 2007) $