-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
In light of #180 is reset: bool in https://github.com/stm32-rs/stm32g4xx-hal/blob/main/src/adc.rs#L2135 really safe to expose considering the user may pass false?. Also is this really a good way to do things since ADC1 and ADC2 share the same RCC enable and reset bit PAC HAL. Same thing with ADC3-ADC5.
In other words if the user does
let adc1 = dp.ADC1.claim(..., reset=false); // Might not have waited long enough after rcc enable to register accessor
let adc1 = dp.ADC1.claim(..., reset=true);
let adc2 = dp.ADC2.claim(..., reset=true); // <--- ADC1 will be reset hereboth seems, in the very least, like huge footguns to me.
Slightly similar situation with FDCAN1-3 sharing the same enable and reset bits. However the hal does not seem to reset them at all on init. Or wait for that matter
Metadata
Metadata
Assignees
Labels
No labels