embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.15k stars 713 forks source link

STM32: F1 ADC does not enforce bound IRQ #3166

Open jamesmunns opened 1 month ago

jamesmunns commented 1 month ago

It seems that the ADC HAL driver doesn't make you pass in the Irq struct?

Leaving a note to investigate this.

jamesmunns commented 1 month ago

on the F3, we do require the presence of the IRQ: https://github.com/embassy-rs/embassy/blob/ed3da1721a4f704d3f2a8a1cf84d9fc051c71945/embassy-stm32/src/adc/f3.rs#L58-L61

But on F1 we don't: https://github.com/embassy-rs/embassy/blob/ed3da1721a4f704d3f2a8a1cf84d9fc051c71945/embassy-stm32/src/adc/f1.rs#L51

diondokter commented 1 month ago

It seems the F1 impl is using the interrupts, so yeah that's probably wrong