rust-embedded / svd2rust

Generate Rust register maps (`struct`s) from SVD files
Apache License 2.0
687 stars 149 forks source link

type aliases in RegisterBlock #645

Closed burrbull closed 2 years ago

rust-highfive commented 2 years ago

r? @Emilgardis

(rust-highfive has picked a reviewer for you, use r? to override)

burrbull commented 2 years ago

After this PR I'm planning to make release. So need more tests. cc @newAM @duskmoon314 @luojia65 Still not sure about #636

duskmoon314 commented 2 years ago

LGFM at the first glance

I noticed that in the generated code, the code order of many of the register fields changed. Is this intentional? (Though this doesn't infect anything. I'm just curious.)

luojia65 commented 2 years ago

Looks good on my projects, it would make register block definition clear, so LGTM.

burrbull commented 2 years ago

I noticed that in the generated code, the code order of many of the register fields changed. Is this intentional? (Though this doesn't infect anything. I'm just curious.)

The cause should be that fields now sorted by bit offset

burrbull commented 2 years ago

bors r=@Emilgardis

bors[bot] commented 2 years ago

Build succeeded: