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

Add derivedFrom to register maker (rust version only) #159

Merged

Conversation

kossnikita
Copy link
Contributor

@burrbull
Copy link
Member

If it works correctly, it makes sense to do similar for make_peripheral, make_cluster and make_field.

@burrbull burrbull changed the title Add derivedFrom to register maker Add derivedFrom to register maker (rust version only) Sep 30, 2023
@kossnikita
Copy link
Contributor Author

Derive a field does not result in derive an enum, but literally derive a field:

TIMER0:
  CR:
    _modify:
      IDR:
        derivedFrom: RELOAD

Clears enums and add attribute to field.

            <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>

As far as I know, no current patch does this. It also doesn't work correctly with svd2rust: it tries to duplicate enumerations in the same module.

@burrbull
Copy link
Member

It also doesn't work correctly with svd2rust: it tries to duplicate enumerations in the same module.

Yeah. This is the bug.
Could you open issue in svd2rust repo?

@kossnikita
Copy link
Contributor Author

@burrbull burrbull merged commit e5b65b4 into rust-embedded:master Oct 1, 2023
11 checks passed
@kossnikita kossnikita deleted the feature/modify-register-derive branch October 1, 2023 14:59
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