don't generate adc peripheral for f3 series

This commit is contained in:
Don Reilly 2023-08-08 16:46:30 -05:00
parent b7114fb951
commit e31545860e

View File

@ -310,7 +310,10 @@ fn main() {
for p in METADATA.peripherals { for p in METADATA.peripherals {
// generating RccPeripheral impl for H7 ADC3 would result in bad frequency // generating RccPeripheral impl for H7 ADC3 would result in bad frequency
if !singletons.contains(&p.name.to_string()) || (p.name == "ADC3" && METADATA.line.starts_with("STM32H7")) { if !singletons.contains(&p.name.to_string())
|| (p.name == "ADC3" && METADATA.line.starts_with("STM32H7"))
|| (p.name.starts_with("ADC") && p.registers.as_ref().map_or(false, |r| r.version == "f3"))
{
continue; continue;
} }