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

refactor KeyboardioHID more abstractly #1410

Merged
merged 22 commits into from
Mar 15, 2024
Merged

Conversation

tlyu
Copy link
Collaborator

@tlyu tlyu commented Mar 13, 2024

Refactor the platform-independent front end bits out out of KeyboardioHID, so they can be used by other back ends that aren't based on PluggableUSB.

tlyu added 22 commits March 13, 2024 15:23
Correct the field names for the HID descriptor. This was only filled using a macro, so no change in the resulting bytes.

Signed-off-by: Taylor Yu <[email protected]>
It contains the "portable" constants that a front-end API might use.

Convert AbsoluteMouseAPI to depend on this, without needing HID.h.

Signed-off-by: Taylor Yu <[email protected]>
This makes it easier to get the simulator tests working again.

Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Slight behavior change, but it's not a problem if we report a smaller
endpoint size to the host than we've allocated for endpoint buffer RAM.

Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
There are no remaining lines from the Arduino original.

Signed-off-by: Taylor Yu <[email protected]>
Signed-off-by: Taylor Yu <[email protected]>
@obra
Copy link
Member

obra commented Mar 13, 2024

Cool. Thanks. Does this feel ready to merge to you?

@tlyu
Copy link
Collaborator Author

tlyu commented Mar 14, 2024

I think so. It's been stable for quite some time. There is one behavior change that I did to work around what seems like a bug in clang-format-15 that's not present in my local version. I think it was trying to align assignments that it shouldn't have, maybe across different blocks, or even different functions? Hopefully the commit message makes it somewhat clear.

@obra obra merged commit b2d618f into keyboardio:master Mar 15, 2024
8 checks passed
@obra
Copy link
Member

obra commented Mar 15, 2024

Thanks! Merged.

@tlyu tlyu deleted the hid-abstract branch March 22, 2024 20:06
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