Skip to content

Commit

Permalink
Drop the <TBD> descriptions which seemingly break SVDConv
Browse files Browse the repository at this point in the history
Use the string "No Description." instead.

Reported-by: @Gasman2014
Ref: #27 (comment)
  • Loading branch information
Rahix committed Jul 5, 2021
1 parent a87069e commit 3763146
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/svd/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn generate(f: &chip::Field) -> crate::Result<xmltree::Element> {
desc.as_ref()
} else {
log::warn!("Description missing for field {:?}", f.name);
"<TBD>"
"No Description."
},
);
el.child_with_text("bitRange", format!("[{}:{}]", f.range.1, f.range.0));
Expand Down
2 changes: 1 addition & 1 deletion src/svd/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn generate(peripherals: &mut xmltree::Element, c: &chip::Chip) -> crate::Re
desc.as_ref()
} else {
log::warn!("Description missing for field {:?}", interrupt.name);
"<TBD>"
"No Description."
},
);

Expand Down
2 changes: 1 addition & 1 deletion src/svd/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn generate(p: &chip::Peripheral) -> crate::Result<xmltree::Element> {
desc.as_ref()
} else {
log::warn!("Description missing for peripheral {:?}", p.name);
"<TBD>"
"No Description."
},
);
el.child_with_text("baseAddress", format!("0x{:X}", base));
Expand Down
2 changes: 1 addition & 1 deletion src/svd/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn generate(r: &chip::Register, base: usize) -> crate::Result<xmltree::Eleme
desc.as_ref()
} else {
log::warn!("Description missing for register {:?}", r.name);
"<TBD>"
"No Description."
},
);
el.child_with_text("addressOffset", format!("0x{:X}", r.address - base));
Expand Down
2 changes: 1 addition & 1 deletion src/svd/restriction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn generate_enumerated(e: &chip::EnumeratedValue) -> crate::Result<xmltree::
desc.as_ref()
} else {
log::warn!("Description missing for enumeratedValue {:?}", e.name);
"<TBD>"
"No Description."
},
);
el.child_with_text("value", e.value.to_string());
Expand Down

0 comments on commit 3763146

Please sign in to comment.