From ea93f0bd132776a4e52005e944142baf8513cb97 Mon Sep 17 00:00:00 2001 From: trembel Date: Mon, 23 Nov 2020 11:41:00 +0100 Subject: [PATCH] [MOD] Fallback to `` caption, if `` has not caption. Signed-off-by: trembel --- src/atdf/peripheral.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atdf/peripheral.rs b/src/atdf/peripheral.rs index 64d8d2b..6a6093e 100644 --- a/src/atdf/peripheral.rs +++ b/src/atdf/peripheral.rs @@ -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, }) }