Skip to content

Register definitions with the same <name> but different <alternateGroup> generates duplicate structs. #504

Closed
@john-terrell

Description

@john-terrell

I'm unsure I this is a dupe of #357. The SVD here creates duplicate structs.

error[E0428]: the name CMR is defined multiple times
--> pac/atsam4lc2a/src/tc0.rs:151:1
|
147 | pub type CMR = crate::Regcmr::CMR_SPEC;
| ----------------------------------------- previous definition of the type CMR here
...
151 | pub type CMR = crate::Regcmr::CMR_SPEC;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ CMR redefined here
|
= note: CMR must be defined only once in the type namespace of this module

And the code does indeed contain duplicates:

#[doc = "Channel Control Register Channel"]
pub mod ccr;
#[doc = "CMR register accessor: an alias for Reg<CMR_SPEC>"]
pub type CMR = crate::Regcmr::CMR_SPEC;
#[doc = "Channel Mode Register Channel"]
pub mod cmr;

#[doc = "CMR register accessor: an alias for Reg<CMR_SPEC>"]
pub type CMR = crate::Regcmr::CMR_SPEC;
#[doc = "Channel Mode Register Channel"]
pub mod cmr;

#[doc = "CV register accessor: an alias for Reg<CV_SPEC>"]
pub type CV = crate::Regcv::CV_SPEC;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions