Currently the keyboard writes a new report to the USB Tx FIFO everytime there's new data to send, but not when the host asks for it. This means that the host may receive some slightly outdated data. To my knowledge, this is the way that usb-device, usbd-hid and synopsys-usb-otg crates allows us to write reports into the USB endpoint, but maybe we can do a little bit better by always clearing the Tx FIFO before sending new data, effectively replacing the old data that was pending to be sent.
Ref:
|
// TODO This method writes to the USB FIFO once we have |
Currently the keyboard writes a new report to the USB Tx FIFO everytime there's new data to send, but not when the host asks for it. This means that the host may receive some slightly outdated data. To my knowledge, this is the way that usb-device, usbd-hid and synopsys-usb-otg crates allows us to write reports into the USB endpoint, but maybe we can do a little bit better by always clearing the Tx FIFO before sending new data, effectively replacing the old data that was pending to be sent.
Ref:
dxkb/crates/dxkb-core/src/keyboard.rs
Line 283 in 9b819a0