I'm developing a bare metal USB device on the Avnet Zedboard using the USB connector. I found Xilinx USB device example code. I compiled it and it works. I can send data over endpoint 1 out from the USB host to the Xilinx code on the Zedboard. The message is received and I can print the message.
I'm having difficulty sending data from the Xilinx code on the Zedboard back to the host. I'm using LIBUSB on an Ubuntu machine. I get timeout errors. The Xilinx example only has callbacks for receiving data on endpoint 1 which is an endpoint OUT on the host.
On the host using LIBUSB I issue the libusb_bulk_transfer() function with and endpoint address of 0x81. That should be a request for data on endpoint 1. To the host its endpoint 1 IN.
In the Xilinx code in the function XUsbPs_Ep1EventHandler() I get no indication of the host trying to ask for data. There is and event code of XUSBPS_EP_EVENT_DATA_TX but the code never gets there. I've tried sending data with XUsbPs_EpBufferSend() then hoping to get the event code when I issue the libusb_bulk_transfer() function on the host. Same thing endpoint timeout error. Can some tell me the proper way to send data from the Xilinx code to the host ?