You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, that assignment to buffer->state shouldn't be there. usb_generic_control_rx_setup() will set the state itself if the retrieval completes, and sometimes it doesn't. If it doesn't, hidUSBDataSetup() will be called again. However, if the assignment above is present, then the buffer will be marked as unread twice (and so picked up by the application twice).
It seems that just removing the assignment fixes things.
The text was updated successfully, but these errors were encountered:
In usb_hid.c:hidUSBDataSetup(), there's this code:
[code]
usb_generic_control_rx_setup(buffer->buffer, buffer->bufferSize, &(buffer->state));
buffer->state = HID_BUFFER_UNREAD;
[/code]
As far as I can tell, that assignment to
buffer->state
shouldn't be there.usb_generic_control_rx_setup()
will set the state itself if the retrieval completes, and sometimes it doesn't. If it doesn't,hidUSBDataSetup()
will be called again. However, if the assignment above is present, then the buffer will be marked as unread twice (and so picked up by the application twice).It seems that just removing the assignment fixes things.
The text was updated successfully, but these errors were encountered: