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 // 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(); let rcc_family = chip_family.strip_prefix("stm32").unwrap();
//.strip_prefix("stm32")
//.unwrap();
let rcc_reg_path = Path::new(&dir) let rcc_reg_path = Path::new(&dir)
.join("registers") .join("registers")
.join(&format!("rcc_{}.yaml", rcc_family)); .join(&format!("rcc_{}.yaml", &rcc_family[0..2]));
let mut rcc: ir::IR = serde_yaml::from_reader(File::open(rcc_reg_path).unwrap()).unwrap(); 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 peripheral_versions: HashMap<String, String> = HashMap::new();
let mut pin_table: Vec<Vec<String>> = Vec::new(); let mut pin_table: Vec<Vec<String>> = Vec::new();