Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hook to skip blinking on WebUSB HID serial traffic. #1019

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

microbit-carlos
Copy link
Contributor

@microbit-carlos microbit-carlos commented Mar 22, 2023

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 from usbd_user_hid.c to DAP_queue.c and renames 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.

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.

@microbit-carlos
Copy link
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants