Do not reject peripherals without registers #81
Merged
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.
For TM4C, interrupts cannot be automatically, easily, or possibly
at all (since SVD does not define how interrupt sharing should work)
be associated in an 1:n fashion to peripherals.
Since svd2rust does not really care where the interrupts are in SVD,
I simply emit a fake peripheral with the complete list of interrupts
(but no registers at all). This peripheral thence does not show up
in the generated code, except in
mod interrupts.The SVD specification permits this behavior (the
<registers>element is marked as
0..1occurrences; nowhere in the textI could find a requirement that a peripheral have registers;
and it passes schema validation).