From a92d6a372bea6b111fa1d2023b328942bae19e5f Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Wed, 9 Jun 2021 13:50:04 +0200 Subject: [PATCH] Cleanup and fix l4s --- stm32-metapac/build.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stm32-metapac/build.rs b/stm32-metapac/build.rs index 4c7c0e0d..fe505c87 100644 --- a/stm32-metapac/build.rs +++ b/stm32-metapac/build.rs @@ -156,14 +156,12 @@ fn main() { }; // Load RCC register for chip - let chip_family = chip.family.to_ascii_lowercase().clone(); + let chip_family = chip.family.to_ascii_lowercase(); let rcc_family = chip_family.strip_prefix("stm32").unwrap(); - //.strip_prefix("stm32") - //.unwrap(); let rcc_reg_path = Path::new(&dir) .join("registers") - .join(&format!("rcc_{}.yaml", rcc_family)); - let mut rcc: ir::IR = serde_yaml::from_reader(File::open(rcc_reg_path).unwrap()).unwrap(); + .join(&format!("rcc_{}.yaml", &rcc_family[0..2])); + let rcc: ir::IR = serde_yaml::from_reader(File::open(rcc_reg_path).unwrap()).unwrap(); let mut peripheral_versions: HashMap = HashMap::new(); let mut pin_table: Vec> = Vec::new();