Skip to content

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

Merged
mathias-arm merged 1 commit into
ARMmbed:mainfrom
microbit-carlos:bulk-blink-3
Mar 23, 2023
Merged

Update hook to skip blinking on WebUSB HID serial traffic.#1019
mathias-arm merged 1 commit into
ARMmbed:mainfrom
microbit-carlos:bulk-blink-3

Conversation

@microbit-carlos
Copy link
Copy Markdown
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
Copy Markdown
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