stm32 H5: LSE low drive mode is not functional

This commit is contained in:
eZio Pan 2024-03-27 00:55:44 +08:00
parent 133a753e49
commit cf11d28d62

View File

@ -24,6 +24,7 @@ pub struct LseConfig {
#[allow(dead_code)]
#[derive(Default, Clone, Copy)]
pub enum LseDrive {
#[cfg(not(stm32h5))] // ES0565: LSE Low drive mode is not functional
Low = 0,
MediumLow = 0x01,
#[default]
@ -38,6 +39,7 @@ impl From<LseDrive> for crate::pac::rcc::vals::Lsedrv {
use crate::pac::rcc::vals::Lsedrv;
match value {
#[cfg(not(stm32h5))] // ES0565: LSE Low drive mode is not functional
LseDrive::Low => Lsedrv::LOW,
LseDrive::MediumLow => Lsedrv::MEDIUMLOW,
LseDrive::MediumHigh => Lsedrv::MEDIUMHIGH,