Hi, I use usb HID to send and recive data. I used the sdk to generate the code. the way it is generated,
is when host send data to the micro (interrupt out), it will end up inside USB_DeviceHidGenericAction, then USB_DeviceHidSend is used to send data to host, then USB_DeviceHidRecv , is used to get the data that the host sent. in this case, USB_DeviceHidSend works fine.
However, I can only send data to host, only, when the host try sent data to the micro and I want to send and receive data separately. So what I tried to do is outside USB_DeviceHidGenericAction, and after specific time pass, I call USB_DeviceHidSend to send data to host. however, first time it return kStatus_USB_Success, then every time after it return kStatus_USB_Busy. it worth knowing that the code does not enter USB_DeviceHidInterruptIn even when it returned kStatus_USB_Success so it does not clear the busy flag.

so how I can use USB_DeviceHidSend outside of USB_DeviceHidGenericAction.
any Help is appreciated, thanks in advance.