Handle other L4 variants

This commit is contained in:
Ulf Lilleengen 2021-06-08 17:37:41 +02:00
parent 6e63bf7e44
commit f7394e56ef

View File

@ -225,7 +225,7 @@ fn main() {
let (enable_reg, reset_reg) = if chip.family == "STM32H7" && clock == "APB1" let (enable_reg, reset_reg) = if chip.family == "STM32H7" && clock == "APB1"
{ {
(format!("{}lenr", reg), format!("{}lrstr", reg)) (format!("{}lenr", reg), format!("{}lrstr", reg))
} else if chip.family == "STM32L4" && clock == "APB1" { } else if chip.family.starts_with("STM32L4") && clock == "APB1" {
(format!("{}enr1", reg), format!("{}rstr1", reg)) (format!("{}enr1", reg), format!("{}rstr1", reg))
} else { } else {
(format!("{}enr", reg), format!("{}rstr", reg)) (format!("{}enr", reg), format!("{}rstr", reg))