fix svd2utra bug where instead of merging SVDs we only use the last one in the list

This commit is contained in:
bunnie 2023-07-17 18:24:32 +08:00
parent 2c53eb0508
commit b9630c7056

View file

@ -1042,7 +1042,7 @@ pub fn parse_svd<T: Read>(sources: Vec::<T>) -> Result<Description, ParseError>
match reader.read_event_into(&mut buf) {
Ok(Event::Start(ref e)) => match e.name() {
QName(b"peripherals") => {
description.peripherals = generate_peripherals(&mut reader)?;
description.peripherals.append(&mut generate_peripherals(&mut reader)?);
}
QName(b"vendorExtensions") => {
parse_vendor_extensions(&mut reader, &mut description)?;