Merge pull request #2738 from eZioPan/h5-lse-low-drive

stm32 H5: LSE low drive mode is not functional
This commit is contained in:
Dario Nieuwenhuis 2024-03-27 14:34:22 +00:00 committed by GitHub
commit 289c5edb9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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