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

fix field derive #746

Merged
merged 2 commits into from
Oct 1, 2023
Merged

fix field derive #746

merged 2 commits into from
Oct 1, 2023

Conversation

burrbull
Copy link
Member

@burrbull burrbull commented Oct 1, 2023

partially fixes #745

need more tests

cc @kossnikita

src/generate/register.rs Outdated Show resolved Hide resolved
src/generate/register.rs Outdated Show resolved Hide resolved
@kossnikita
Copy link

In my case it works good

@burrbull burrbull marked this pull request as ready for review October 1, 2023 08:45
@burrbull burrbull requested a review from a team as a code owner October 1, 2023 08:45
@burrbull
Copy link
Member Author

burrbull commented Oct 1, 2023

In my case it works good

Could you test yet once, please.

@kossnikita
Copy link

Looks good to me

<field derivedFrom="RELOAD">
  <name>IDR</name>
  <description>Selects, if Reload Register number is incremented, decremented or not modified</description>
  <bitRange>[27:26]</bitRange>
  <access>read-write</access>
</field>
#[doc = "Field `IDR` reader - Selects, if Reload Register number is incremented, decremented or not modified"]
pub use RELOAD_R as IDR_R;
#[doc = "Field `IDR` writer - Selects, if Reload Register number is incremented, decremented or not modified"]
pub use RELOAD_W as IDR_W;
svd2rust 0.30.0 (ee3afce 2023-10-01)

@Emilgardis Emilgardis added this pull request to the merge queue Oct 1, 2023
Merged via the queue into master with commit cff4ac4 Oct 1, 2023
43 checks passed
@Emilgardis Emilgardis deleted the derive-field branch October 1, 2023 13:13
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.

Derived fields duplicate enums instead type cast
3 participants