Hi-
I'm new to using the Cypress chips (FX2), and I'm looking for some pointers on getting started with CyUSB.net ...
I have the FX2LP set up in FIFO mode, bulk endpoint (IN) on EP6, which is connected to an FPGA that generates packets to send. This is based on the AN61345 slave FIFO app note, but modified so it puts a data packet in the FIFO every 0.5 ms. I can read this data using the Streamer C# application (AN4053), or the Control Center. I can make a simple C# program of my own that reads packets, based on these examples.
To this point, I've usually used RS232 (or CDC device class), for which the process typically is:
1. open a handle to the port (CreateHandle)
2. this causes the operating system to buffer data until read by the application; also, it grants exclusive access
3. read data
4. close the port when done
5. if the operating system's buffer overflowed, an error flag is set that the program can see
Using CyUSB.net...
1. Is there an equivalent of "opening the endpoint"? I don't see an equivalent way to signal to CyUSB, "hey, direct all incoming packets to my application!"
2. How do I guarantee that I get all packets in order, with none lost?
3. How do I guarantee exclusive access for my program?
For example, I can run 2 instances of the Streamer example side-by-side, and neither knows that it is losing half the data to the other program!
Thanks!