You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys.
I'm trying to write a async task that convert analog to digital from an adc channel, but i would like to make it generic for channels.
The code is like this:
`#[embassy_executor::task]
async fn adc_task(mut adc: adc::Adc<'static, ADC1>, mut adc_pin: embassy_stm32::peripherals::PA1) {
Hi guys.
I'm trying to write a async task that convert analog to digital from an adc channel, but i would like to make it generic for channels.
The code is like this:
`#[embassy_executor::task]
async fn adc_task(mut adc: adc::Adc<'static, ADC1>, mut adc_pin: embassy_stm32::peripherals::PA1) {
}`
Is there any way to passing a generic adc channel instead of a speficic pin (peripherals::PA1)? Something similar to AnyPin.
Any thoughts about this?
Thanks in advance.
The text was updated successfully, but these errors were encountered: