Cleanup and fix l4s

This commit is contained in:
Ulf Lilleengen 2021-06-09 13:50:04 +02:00
parent bd759510ba
commit a92d6a372b

View File

@ -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<String, String> = HashMap::new();
let mut pin_table: Vec<Vec<String>> = Vec::new();