Struct stm32f412g::clocks::pll::Pll
source · pub struct Pll<'a, PllConstants> { /* private fields */ }
Expand description
Main PLL clock structure.
Implementations§
source§impl<'a, PllConstants> Pll<'a, PllConstants>where
PllConstants: PllConstants,
impl<'a, PllConstants> Pll<'a, PllConstants>where
PllConstants: PllConstants,
sourcepub fn enable(&self) -> Result<(), ErrorCode>
pub fn enable(&self) -> Result<(), ErrorCode>
Start the PLL clock.
§Errors
- Err(ErrorCode::BUSY): if enabling the PLL clock took too long. Recall this method to ensure the PLL clock is running.
sourcepub fn disable(&self) -> Result<(), ErrorCode>
pub fn disable(&self) -> Result<(), ErrorCode>
Stop the PLL clock.
§Errors
- Err(ErrorCode::FAIL): if the PLL clock is configured as the system clock.
- Err(ErrorCode::BUSY): disabling the PLL clock took to long. Retry to ensure it is not running.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
sourcepub fn get_frequency_mhz(&self) -> Option<usize>
pub fn get_frequency_mhz(&self) -> Option<usize>
sourcepub fn get_frequency_mhz_no_cache(
&self,
source_frequency: usize,
) -> Option<usize>
pub fn get_frequency_mhz_no_cache( &self, source_frequency: usize, ) -> Option<usize>
sourcepub fn get_frequency_mhz_pll48(&self) -> Option<usize>
pub fn get_frequency_mhz_pll48(&self) -> Option<usize>
Auto Trait Implementations§
impl<'a, PllConstants> !Freeze for Pll<'a, PllConstants>
impl<'a, PllConstants> !RefUnwindSafe for Pll<'a, PllConstants>
impl<'a, PllConstants> !Send for Pll<'a, PllConstants>
impl<'a, PllConstants> !Sync for Pll<'a, PllConstants>
impl<'a, PllConstants> Unpin for Pll<'a, PllConstants>where
PllConstants: Unpin,
impl<'a, PllConstants> !UnwindSafe for Pll<'a, PllConstants>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more