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

generic REG in field writers #731

Merged
merged 4 commits into from
Jun 13, 2023
Merged

generic REG in field writers #731

merged 4 commits into from
Jun 13, 2023

Conversation

burrbull
Copy link
Member

@burrbull burrbull commented Jun 5, 2023

should fix #705

@burrbull burrbull added no changelog no-changelog and removed no changelog no-changelog labels Jun 5, 2023
@burrbull burrbull marked this pull request as ready for review June 5, 2023 17:14
@burrbull burrbull requested a review from a team as a code owner June 5, 2023 17:14
@burrbull
Copy link
Member Author

burrbull commented Jun 5, 2023

cc @kaizensparc

@burrbull
Copy link
Member Author

burrbull commented Jun 7, 2023

This PR does 2 breaking things:

  1. It reverts Accessor newtypes #465 which had been added wrappers around W<REG> and R<REG. It was done first of all to improve documentation, but instead requires additional implementation of From, Deref, DerefMut. It also adds several restriction, one of which blocked to do second action. Instead of this to make documentaion cleaner I just add additional hidden level of type aliases WRaw and RRaw.
  2. Now REG parameter of FieldWriter is generic in implementations (like already done for offset parameter). This makes possible to import of derived field writer without any additional implementation and makes code (and documentation) for derived FieldReader and FieldWriter much more similar each other.

cc @rust-embedded/tools

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 13, 2023

Configuration problem:
bors.toml: not found

@therealprof therealprof added this pull request to the merge queue Jun 13, 2023
Merged via the queue into master with commit 062d0b9 Jun 13, 2023
@therealprof therealprof deleted the remove-wrappers branch June 13, 2023 19:28
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.

Field writer has no impl when enumeratedValue is derived across peripherals
2 participants