-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
split polling can_read and reading from USB #4419
Conversation
|
86f3140
to
e942f8e
Compare
Tangential: do we still use HID anywhere in Core? Maybe it is time to remove it (in different PR)? |
FIDO runs over HID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpicks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed a fixup 6ef3b8b to your branch that implements better buffer handling in codec_v1. Tried to do the same thing for FIDO but backed out because of the frankly insane use of overlay_struct
, so a much more careful approach would be needed.
ACK on the new API, just some nits to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good if the CI passes
7d2f091
to
c3e50d6
Compare
This PR changes the way reading from USB works: the polling mechanism is only used to detect if there is a new message, the reading itself is done separately.
The emulator implementation is modified a bit, since there is a need to do the PING-PONG and it is undesirable to emit a CAN_READ event due to this- therefore the message is read into buffer during polling, and the read from the buffer upon read.
This should enable some optimized usage of the message buffer, but this is not done in this PR.