summaryrefslogtreecommitdiff
path: root/include/keyboard_protocol.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2016-11-15 15:35:58 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-17 07:08:23 -0800
commitdfc9b86c82204096e869678ad3b3b08dfa06ae6b (patch)
tree501e12f0a0105d2b16b340221de1cd2758d88561 /include/keyboard_protocol.h
parente9584bc6cea8677979ffe2929e75f2ef037ec764 (diff)
downloadchrome-ec-dfc9b86c82204096e869678ad3b3b08dfa06ae6b.tar.gz
chip/stm32/usb_hid_keyboard: Fix set_keyboard_report race
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>
Diffstat (limited to 'include/keyboard_protocol.h')
0 files changed, 0 insertions, 0 deletions