Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cleans up the USB Keyboard HID driver by no longer requiring an input buffer for sending strings or characters. Instead, make a local buffer on the stack and use that. The synchronous function that actually sends a buffer has not been changed.
When testing, I found that
usb_keyboard_hid_send()
would sometimes returnERESERVE
. This behavior occurs in the original version as well before this commit.ERESERVE
means either the buffer couldn't be taken, or something else couldn't unwrap (I can't follow that mess). https://github.com/tock/tock/blob/master/capsules/extra/src/usb_hid_driver.rs#L205-L231 However, HID output does appear correctly and the app keeps working, so I guess we can keep ignoring it for now...?