Skip to content

Conversation

@whitequark
Copy link
Contributor

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..1 occurrences; nowhere in the text
I could find a requirement that a peripheral have registers;
and it passes schema validation).

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`.
@japaric
Copy link
Member

japaric commented Apr 30, 2017

in an 1:n fashion to peripherals.

By this, do you mean that the same (with the same interupt number) appears in several trees?

In any case, this change looks good to me.

@homunkulus r+

@homunkulus
Copy link
Contributor

📌 Commit b22a910 has been approved by japaric

@homunkulus
Copy link
Contributor

⌛ Testing commit b22a910 with merge b22a910...

@homunkulus
Copy link
Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: japaric
Pushing b22a910 to master...

@homunkulus homunkulus merged commit b22a910 into rust-embedded:master Apr 30, 2017
@whitequark whitequark deleted the no-regs branch April 30, 2017 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants