-
Notifications
You must be signed in to change notification settings - Fork 6
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
gpio: rearrange module to split version 1 and version 2 code #13
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
luojia65
force-pushed
the
feat/gpio-rearrange
branch
from
December 19, 2024 04:16
559a344
to
0714b1c
Compare
Documentation fixes on Pad structure Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
from
December 19, 2024 04:27
0714b1c
to
5d4df4b
Compare
…on functions in IntoPad Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
from
December 19, 2024 06:23
95c7588
to
2f06dae
Compare
small documentation fixes Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
2 times, most recently
from
December 19, 2024 07:08
3678333
to
86d1a4c
Compare
Simplify inner structures into `Inner` struct. Now `Padv1` and `Padv2` inner structures are hidden and treated as inner implementations. Now struct Pad is split into Disabled, Input, Output and Alternate structures to make code clearer. Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
2 times, most recently
from
December 19, 2024 07:17
3339b95
to
130f5b9
Compare
Code cleanup Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
2 times, most recently
from
December 19, 2024 08:59
37e1796
to
88758ac
Compare
… to RegisterBlock This change shortens code and number of type generics. Code cleanup, pass tests on all feature gate options. Signed-off-by: Zhouqi Jiang <[email protected]>
luojia65
force-pushed
the
feat/gpio-rearrange
branch
from
December 19, 2024 09:02
88758ac
to
63c17cb
Compare
Placebo27
approved these changes
Dec 19, 2024
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.
LGTM!
The are bugs on mainline project, will be fixed on further contributions later. |
Placebo27
reviewed
Dec 20, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the GPIO module to improve code organization and readability. The Pad structure has been split into four distinct structures: Disabled, Input, Output, and Alternate, with the internal implementations of Padv1 and Padv2 now hidden within an Inner struct. Additionally, version 1 and version 2 code for GPIO functionality has been separated for clarity.
The update also introduces new pad structs (Input, Output, Disabled) and conversion functions in the IntoPad trait. The GLBv2 GPIO conversation logic is now implemented, removing the Alternate trait for simplicity. Documentation has been improved, and various code cleanups have been made, including the use of a reference to the GLB RegisterBlock to reduce complexity. All tests pass successfully across different feature gate options.