mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
We always want set_keyboard_report to send the freshest possible data. For this purpose, we use double-buffering on the USB endpoint. When the endpoint is currently busy, we sneak in an address change, hoping that the hardware will pick it up. There is no guarantee about which buffer was transferred, so we queue another transfer anyway. This means that the code will send a duplicate (harmless) report in that case. BRANCH=none BUG=chrome-os-partner:59083 TEST=make buildall -j TEST=make BOARD=hammer -j && util/flash_ec --board=hammer Change-Id: I9d14541b8b05017c1d5051b9a315db381a89dcea Reviewed-on: https://chromium-review.googlesource.com/411741 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>