This is done by adding internal structs for the DAC outputs and passing these into the constructor functions instead of an input pin, e.g. opamp1.follower(Dac3Out1, Some(gpioa.pa2.into_analog()));
I've tested that this works at least with opamps 1, 3, 4, and 5 in follower mode on an STM32G473. Can't verify everything of course but I don't see anything obvious that would break elsewhere, and it at least builds for other devices.
After writing this I now see related work in https://github.com/stm32-rs/stm32g4xx-hal/pull/113. If I'm reading right, I think this change is completely orthogonal and should merge with that one pretty cleanly.
This is done by adding internal structs for the DAC outputs and passing these into the constructor functions instead of an input pin, e.g.
opamp1.follower(Dac3Out1, Some(gpioa.pa2.into_analog()));
I've tested that this works at least with opamps 1, 3, 4, and 5 in follower mode on an STM32G473. Can't verify everything of course but I don't see anything obvious that would break elsewhere, and it at least builds for other devices.
After writing this I now see related work in https://github.com/stm32-rs/stm32g4xx-hal/pull/113. If I'm reading right, I think this change is completely orthogonal and should merge with that one pretty cleanly.