stm32-rs / stm32l0xx-hal

A hardware abstraction layer (HAL) for the STM32L0 series microcontrollers written in Rust
BSD Zero Clause License
96 stars 60 forks source link

Disabling ADC Voltage Regulator before Low-power mode #231

Open sreyhani opened 10 months ago

sreyhani commented 10 months ago

the only way to disable voltage regulater before going to sleep is to manually edit register yourself, which also needs access to internal rb by calling release on ADC, which deconsturcts the adc

adc.release().cr.modify(|_, w| w.advregen().clear_bit());

would be nice to have a direct API on this