[stm32] Adapt enum.zig#945
Open
JAicewizard wants to merge 11 commits intoZigEmbeddedGroup:mainfrom
Open
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 makes it so that all peripherals always get added, so this should be good for almost any chip. Only thing that needs to be done is potentially add more indexed peripherals. This commit also fixes the peripheral index to work on chips where the peripherals are not coincidentally in order.
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.
This is currently a bit messy as it includes the changes in #939, this will be fixed once that is merged.
[The commits intended to be in] this PR remove remove the constant strings for which peripherals should be included, and change how
base_perihperal_indexworks. This last change could technically breaking, but it was extremely unreliable as it depended on the order the peripherals were specified by embassy. I do not believe any correct usage is affected.