Skip to content

Commit 56c98ff

Browse files
authored
Merge pull request #107 from stm32-rs/fixreadaction
fix read action modify
2 parents 88c3aca + 5f70899 commit 56c98ff

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/patch/register.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,7 @@ impl RegisterExt for Register {
533533

534534
fn set_field_read_action(&mut self, fspec: &str, action: ReadAction) {
535535
for ftag in self.iter_fields(fspec) {
536-
ftag.read_action = if action == ReadAction::Modify {
537-
None
538-
} else {
539-
Some(action)
540-
};
536+
ftag.read_action = Some(action);
541537
}
542538
}
543539

svdtools/patch.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,6 @@ def set_field_read_action(self, fspec, action):
13871387
tag = ftag.find("readAction")
13881388
if tag is None:
13891389
tag = ET.SubElement(ftag, "readAction")
1390-
elif action == "modify":
1391-
ftag.remove(tag)
1392-
return
13931390
tag.text = action
13941391

13951392
def set_field_modified_write_values(self, fspec, mwv):

0 commit comments

Comments
 (0)