Struct stm32f412g::clocks::hsi::Hsi
source · pub struct Hsi<'a> { /* private fields */ }
Expand description
Main HSI clock structure
Implementations§
source§impl<'a> Hsi<'a>
impl<'a> Hsi<'a>
sourcepub fn enable(&self) -> Result<(), ErrorCode>
pub fn enable(&self) -> Result<(), ErrorCode>
Start the HSI clock.
§Errors
- Err(ErrorCode::BUSY): if enabling the HSI clock took too long. Recall this method to ensure the HSI clock is running.
sourcepub fn disable(&self) -> Result<(), ErrorCode>
pub fn disable(&self) -> Result<(), ErrorCode>
Stop the HSI clock.
§Errors
- Err(ErrorCode::FAIL): if the HSI clock is configured as the system clock.
- Err(ErrorCode::BUSY): disabling the HSI clock took to long. Retry to ensure it is not running.
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for Hsi<'a>
impl<'a> !RefUnwindSafe for Hsi<'a>
impl<'a> !Send for Hsi<'a>
impl<'a> !Sync for Hsi<'a>
impl<'a> Unpin for Hsi<'a>
impl<'a> !UnwindSafe for Hsi<'a>
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