Update hook to skip blinking on WebUSB HID serial traffic.#1019
Merged
Conversation
Contributor
Author
|
@mathias-arm you should be able to edit this branch before merging, so feel free to do any changes you think are appropriate 👍 |
Move usbd_hid_no_activity() hook from usbd_user_hid.c to DAP_queue.c and rename it to DAP_activity_blink(). In this new location it can be used to skip HID LED blinking in traffic from USB bulk as well. Add default behaviour of skipping HID blink of DAP serial & MSD activity to the default hook for all projects. Remove customised hooks in the artemis & micro:bit projects as they are no longer needed.
88eb9cc to
29e585b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A continuation from this PR, opened from my account fork so that it can be edited by maintainers:
Implemented the suggestion from #1018 (comment) and the final result is:
Moves
usbd_hid_no_activity()hook fromusbd_user_hid.ctoDAP_queue.cand renames it toDAP_activity_blink().In this new location it can be used to skip HID LED blinking in traffic from USB bulk as well.
Adds the default behaviour to the weak function to skip HID blink of DAP serial & MSD activity.
Removes customised hooks in the artemis & micro:bit projects as they are no longer needed.
The logic in the hook has been reverted from a "negative check" to a "positive check" (before
usbd_hid_no_activity()returned true when there was no activity, so then we checked for "not [no activity]") as this way it's easier to reason.