Add STM32L5 support.
This commit is contained in:
@ -14,7 +14,7 @@ fn enable() {
|
||||
crate::pac::RCC.apb2enr().modify(|w| w.set_adcen(true));
|
||||
#[cfg(stm32g0)]
|
||||
crate::pac::RCC.apbenr2().modify(|w| w.set_adcen(true));
|
||||
#[cfg(any(stm32l4, stm32wb))]
|
||||
#[cfg(any(stm32l4, stm32l5, stm32wb))]
|
||||
crate::pac::RCC.ahb2enr().modify(|w| w.set_adcen(true));
|
||||
});
|
||||
}
|
||||
@ -286,6 +286,9 @@ impl<'d, T: Instance> Adc<'d, T> {
|
||||
#[cfg(not(stm32g0))] // TODO is this supposed to be public?
|
||||
#[allow(unused)] // TODO is this supposed to be public?
|
||||
fn calibrate(&mut self, vref: &mut Vref) {
|
||||
#[cfg(stm32l5)]
|
||||
let vref_cal: u32 = todo!();
|
||||
#[cfg(not(stm32l5))]
|
||||
let vref_cal = unsafe { crate::pac::VREFINTCAL.data().read().value() };
|
||||
let old_sample_time = self.sample_time;
|
||||
|
||||
|
Reference in New Issue
Block a user