adc: enable ADC and clock selection for STM32WLx

This commit is contained in:
Olle Sandberg
2023-09-05 12:14:04 +02:00
parent bb2d6c8542
commit 0d3ff34d80
2 changed files with 30 additions and 1 deletions

View File

@ -13,7 +13,7 @@ pub const VREF_CALIB_MV: u32 = 3000;
/// configuration.
fn enable() {
critical_section::with(|_| {
#[cfg(stm32h7)]
#[cfg(any(stm32h7, stm32wl))]
crate::pac::RCC.apb2enr().modify(|w| w.set_adcen(true));
#[cfg(stm32g0)]
crate::pac::RCC.apbenr2().modify(|w| w.set_adcen(true));