Implement pins_v2.zig for stm32f429 and extend support for stm32l479#939
Open
JAicewizard wants to merge 9 commits intoZigEmbeddedGroup:mainfrom
Open
Implement pins_v2.zig for stm32f429 and extend support for stm32l479#939JAicewizard wants to merge 9 commits intoZigEmbeddedGroup:mainfrom
JAicewizard wants to merge 9 commits intoZigEmbeddedGroup:mainfrom
Conversation
They were tightly coupled together, but had different types for the same concept. This introduced unneeded enum casts from and to int, and added complexity.
Previously pins_v2 was only available on the F303 and L47x, and only implemented for 7 GPIO ports on the later. This makes the pins api available to any number of pins (soft limited to 11 due to comptime LUT size). Importer can provide the available number of ports. This also makes the api available for stm32f429
This file contains hidden or 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
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.
fixes #938
This mostly makes
comon/pins_v2.ziggeneric to the number of GPIO ports available on a chip.I have looked into other methods, like having a function that determins the number of ports in
pins_v2.zigitself, but found that it was very cumbersome to implement and it would be easier to pass it down when importing. Since the only files importing this are from microzig itself, this seems like a reasonable option.