Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peripherals as scoped singletons #50

Merged
merged 2 commits into from
Dec 9, 2017
Merged

Peripherals as scoped singletons #50

merged 2 commits into from
Dec 9, 2017

Conversation

japaric
Copy link
Collaborator

@japaric japaric commented Nov 21, 2017

See this RFC for details: rust-embedded/svd2rust#157

TODO

  • un-bless peripherals as resources. Peripherals as resources were special cased: if resource listed in e.g. app.tasks.FOO.resources didn't appear in app.resources then it was assumed to be a peripheral and special code was generated for it. This is no longer required under RFC157.

This depends on PR rtic-rs/rtic-syntax#2 postponed

@japaric japaric changed the title [WIP] Peripherals as scoped singletons Peripherals as scoped singletons Dec 9, 2017
@japaric
Copy link
Collaborator Author

japaric commented Dec 9, 2017

@homunkulus r+

@homunkulus
Copy link
Contributor

📌 Commit 1830bdb has been approved by japaric

@homunkulus
Copy link
Contributor

⌛ Testing commit 1830bdb with merge e78ca98...

japaric pushed a commit that referenced this pull request Dec 9, 2017
Peripherals as scoped singletons

See this RFC for details: rust-embedded/svd2rust#157

- The first commit adapts this crate to the changes in rust-embedded/cortex-m#65 and rust-embedded/svd2rust#158
- ~~The second commit is an alternative implementation of RFC #47 (there's another implementation in #49. This second commit is not required for RFC157 but let us experiment with safe DMA abstractions.~~ postponed

### TODO

- [x] un-bless peripherals as resources. Peripherals as resources were special cased: if resource listed in e.g. `app.tasks.FOO.resources` didn't appear in `app.resources` then it was assumed to be a peripheral and special code was generated for it. This is no longer required under RFC157.

~~This depends on PR rtic-rs/rtic-syntax#2~~ postponed
@homunkulus
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: japaric
Pushing e78ca98 to master...

@homunkulus homunkulus merged commit 1830bdb into master Dec 9, 2017
japaric pushed a commit that referenced this pull request Dec 9, 2017
[RFC] rename LateResourceValues to LateResources

After writing `LateResourceValues` several times I now think it's too long to type. I'd like that
struct to be renamed to `LateResources`. I don't think there would be a loss in readability with the
rename because you can think of "late resources" as resources that "don't exist" until `init` ends
instead of as resources that are not initialized after `init` ends -- the second meaning maps better
to `LateResourceValues`.

This would be a breaking-change but we are moving to v0.3.0 due to #50 in any case.

cc jonas-schievink
japaric pushed a commit that referenced this pull request Dec 9, 2017
[RFC] rename LateResourceValues to LateResources

After writing `LateResourceValues` several times I now think it's too long to type. I'd like that
struct to be renamed to `LateResources`. I don't think there would be a loss in readability with the
rename because you can think of "late resources" as resources that "don't exist" until `init` ends
instead of as resources that are not initialized after `init` ends -- the second meaning maps better
to `LateResourceValues`.

This would be a breaking-change but we are moving to v0.3.0 due to #50 in any case.

cc jonas-schievink
japaric pushed a commit that referenced this pull request Dec 9, 2017
[RFC] rename LateResourceValues to LateResources

After writing `LateResourceValues` several times I now think it's too long to type. I'd like that
struct to be renamed to `LateResources`. I don't think there would be a loss in readability with the
rename because you can think of "late resources" as resources that "don't exist" until `init` ends
instead of as resources that are not initialized after `init` ends -- the second meaning maps better
to `LateResourceValues`.

This would be a breaking-change but we are moving to v0.3.0 due to #50 in any case.

cc jonas-schievink
@japaric japaric deleted the singletons branch December 9, 2017 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants