[−][src]Struct stm32f1xx_hal::time::MegaHertz
Megahertz
Create a frequency specified in megahertz.
See also Hertz
and KiloHertz
for semantically correct ways of creating lower
frequencies.
Examples
Create a an 8 MHz frequency
This example creates an 8 MHz frequency that could be used to configure an SPI peripheral, etc.
use stm32f1xx_hal::time::Hertz; let freq = 8.mhz();
Trait Implementations
impl Clone for MegaHertz
[src]
fn clone(&self) -> MegaHertz
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MegaHertz
[src]
impl Debug for MegaHertz
[src]
impl Div<MegaHertz> for MegaHertz
[src]
type Output = u32
The resulting type after applying the /
operator.
fn div(self, rhs: MegaHertz) -> u32
[src]
impl Div<u32> for MegaHertz
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Self
[src]
impl DivAssign<u32> for MegaHertz
[src]
fn div_assign(&mut self, rhs: u32)
[src]
impl From<MegaHertz> for Hertz
[src]
impl From<MegaHertz> for KiloHertz
[src]
impl Mul<u32> for MegaHertz
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self
[src]
impl MulAssign<u32> for MegaHertz
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
impl PartialEq<MegaHertz> for MegaHertz
[src]
impl StructuralPartialEq for MegaHertz
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,