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