Description
Hello Embassy Team,
I have a question regarding the structure of the STM32 ADC driver. I understand that the design must accommodate specifying the pin for measurement, but I have noticed some inconsistencies compared to other drivers.
Currently, there is a trait for a single channel, AdcChannel, and an abstraction, AnyAdcChannel. It appears that AnyAdcChannel has not been updated with the new PeripheralType trait, which prevents its use in contexts such as:
voltage_sense: Peri<'a, impl AdcChannel<T>>,
This oversight limits the ability to store ADC channels in structs. While I understand that the degrade_adc function allows conversion between types, I believe it should be possible to directly use voltage_sense.into(), similar to how other peripherals operate.
Thank you for your time and assistance.
I am currently working with the relatively new adc driver for the stm32u5.