Skip to content

Commit

Permalink
Fall back to module caption if instance caption is missing
Browse files Browse the repository at this point in the history
Signed-off-by: trembel <silvano.cortesi@hotmail.com>
  • Loading branch information
trembel authored Nov 24, 2020
1 parent a3385d1 commit 4f8450c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atdf/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn parse_list(

peripherals.push(chip::Peripheral {
name: instance.attr("name")?.clone(),
description: instance.attr("caption").ok().cloned(),
description: instance.attr("caption").or(module.attr("caption")).ok().cloned(),
registers,
})
}
Expand Down

0 comments on commit 4f8450c

Please sign in to comment.