Using devices
After getting a device pointer or handle, devices can be used. Before transferring data to or from devices, or catching interrupts (PCI), devices must be accessed, which is done by calling Open(). All calls in this section require an open device, which must be freed by calling Close() after usage.
Either way, after calling Open(), the device is ready for communication. As of the fact, that Cesys devices usually have an FPGA on the device side of the bus, the FPGA must be made ready for usage. If this isn't done by loading contents from the
Important: All data transfer is based on a 32 bit bus system which must be implemented inside the FPGA design. PCI devices support this natively, while USB devices use a protocol which is implemented by Cesys and sits on top of a stable bulk transfer implementation.
Methods/Functions
Open
API | Code |
C++ | void ceDevice::Open() |
CCE_RESULT Open(CE_DEVICE_HANDLE Handle)
.NET void ceDevice.Open()
Gain access to the specific device. Calling one of the other functions in this section require a successful call to Open().
Notice: If two or more applications try to open one device, PCI and USB devices behave a bit different. For USB devices, Open() causes an error if the device is already in use. PCI allows opening one device from multiple processes. As PCI drivers are not developed by Cesys, it's not possible to us to prevent this (as we see this as strange behavior). The best way to share communication of more than one application with devices would be a client / server approach.
Close
API | Code |
C++ | void ceDevice::Close() |
CCE_RESULT Close(CE_DEVICE_HANDLE Handle)
.NET void ceDevice.Close()
USBS6 / |
| http://www.cesys.com/ |
User Doc V0.3 | preliminary |