rust-embedded / svd2rust

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

fix field derive #746

Closed burrbull closed 9 months ago

burrbull commented 9 months ago

partially fixes #745

need more tests

cc @kossnikita

kossnikita commented 9 months ago

In my case it works good

burrbull commented 9 months ago

In my case it works good

Could you test yet once, please.

kossnikita commented 9 months ago

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)