While sending more than one packet on same endpoint using USB_DeviceHidSend(), sometimes packet is not sent out on USB.
While, as per description of USB_DeviceHidSend(),
" Currently, only one transfer request can be supported for one specific endpoint. If there is a specific requirement to support multiple transfer requests for one specific endpoint, the application should implement a queue in the application level. The subsequent transfer could begin only when the previous transfer is done (get notification through the endpoint callback). "
So, I have implement a queue based on ringbuffer to store the packets. And I am sending those stored packets whenever I receive the response kUSB_DeviceHidEventSendResponse via USB_DeviceHidInterruptIn.
Is it correct implementation to avoid usbhid packet send failure?