Update hook to skip blinking on WebUSB HID serial traffic. #1019
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.c
toDAP_queue.c
and 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.