3 ms·
> then push (or respond to a poll with) the complete contents of the buffer as a single USB packet; and flush the buffer on ACK Two issues. Unless you use USB
by magicalhippo 7y ago
> then push (or respond to a poll with) the complete contents of the buffer as a single USB packet; and flush the buffer on ACK
Two issues. Unless you use USB 2.0 high speed, USB "packets" (transactions) are small[1]. For low speed they can have 8 bytes of data, full speed 64 bytes. USB 2.0 HS is a lot more costly of course.
Secondly, keycodes that are sent in the same report have no defined order[2]. Thus if two keys were not present in previous report and are present in current report, the order in which those two keys are pressed are indeterminate to the OS.
So that would not be very helpful I think.
[1]: http://www.usbmadesimple.co.uk/ums_3.htm http://www.usbmadesimple.co.uk/ums_3.htm (Interrupt Transfers)
[2]: https://www.usb.org/document-library/device-class-definition-hid-111 https://www.usb.org/document-library/device-class-definition... (Appendix C)