-
Notifications
You must be signed in to change notification settings - Fork 1.3k
support to get HID OUT report #3302
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
Conversation
@deshipu may want to review as well. |
@xiongyihui This looks good as it stands. Do you still consider it a draft, or have you finished your testing? |
I have tested it. It works well. I would use it in the M60 keyboard. Do you have any other ideas? |
I'm wondering if we should call this |
If we do not consider to add a |
@xiongyihui We have |
Use it as a function or a property? Maybe like |
I think a property would be best. It would return the latest report received. |
I do like Then |
I tend to agree with this, even though we have |
I think My one concern is if folks use HID as a serial-like transport and need every HID out report buffered. I think it's an abuse of the protocol but may still be done. |
I was proposing an actual function; I didn't really think about the hanging part. It could return None if no report was available. We have a long-term interest in using HID RAW reports for communication with a host, because all hosts already support HID RAW natively and don't need drivers. That would require real FIFO support, so I would lean toward a function. It does not have to buffer for now; we can add that later. |
I am all for a function and adding FIFO in the future. |
For USB keyboard, losing some LED reports is not a big deal. We just need to show the latest LED status. |
Let's try to finish this off. @xiongyihui I think you are right about the report ID's: they cannot be used for raw mode. Are you saying you still prefer a property, or that the |
The implementation of |
That is clear thinking, thanks. OK, how about calling it |
I'm OK with |
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.
I pushed changes to make it .last_received_report
. @tannewt, if this is OK by you, we can merge.
Thank you @xiongyihui for your patience.
This is a draft implementation to get USB HID OUT report, which added a
report
property forusb_hid.Device
to get HID OUT report.With the feature. we are able to get the keyboard leds info (capslock, numlock).
Usage:
Besides, Have added a
report
property to BLE HIDReportOut
too.