-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter out nullptr peripheral instances
There are a few peripheral instances that have `NULL` as their base address in the SVD. My guess is that `NULL` is a signal to humans to not use this address. If I remember correctly , the peripherals tagged with `NULL` require indirect access through ANATOP. Until this commit, we've generated those peripheral instances, despite the silly address. However, a runtime check in `NonNull` will panic when the core library is built with debug assertions. Users may hit this panic if they build their firmware with this configuration, then try to acquire the individual peripheral instance or the `Instances` aggregate. The panic in the latter case is inconvenient, especially when the user doesn't care about these instances. This commit removes these `NULL` instances from the public API. I'm keeping the register blocks; pairing `core::mem::offset_of!` with register blocks is useful. For convenience / ease of implementation, I'm doing the filtering down in the codegen step of `raltool`. It would be better to implement this as a standard transform / cleanup step that kept the register block while discarding the instances. We can try this later. I plan to release this breaking change in the 0.5 and 0.6 series. This will affect users who were relying on these incorrect symbols.
- Loading branch information
Showing
6 changed files
with
71 additions
and
196 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.