Enum stm32wlxx_hal::lptim::Prescaler
source · #[repr(u8)]pub enum Prescaler {
Div1 = 0,
Div2 = 1,
Div4 = 2,
Div8 = 3,
Div16 = 4,
Div32 = 5,
Div64 = 6,
Div128 = 7,
}
Expand description
Timer clock prescaler.
Variants§
Div1 = 0
/1
Div2 = 1
/2
Div4 = 2
/4
Div8 = 3
/8
Div16 = 4
/16
Div32 = 5
/32
Div64 = 6
/64
Div128 = 7
/128
Implementations§
source§impl Prescaler
impl Prescaler
sourcepub const fn div(&self) -> u8
pub const fn div(&self) -> u8
Get the prescaler divisor.
Example
use stm32wlxx_hal::lptim::Prescaler;
assert_eq!(Prescaler::Div1.div(), 1);
assert_eq!(Prescaler::Div2.div(), 2);
assert_eq!(Prescaler::Div4.div(), 4);
assert_eq!(Prescaler::Div8.div(), 8);
assert_eq!(Prescaler::Div16.div(), 16);
assert_eq!(Prescaler::Div32.div(), 32);
assert_eq!(Prescaler::Div64.div(), 64);
assert_eq!(Prescaler::Div128.div(), 128);
Trait Implementations§
source§impl PartialEq for Prescaler
impl PartialEq for Prescaler
impl Copy for Prescaler
impl Eq for Prescaler
impl StructuralEq for Prescaler
impl StructuralPartialEq for Prescaler
Auto Trait Implementations§
impl RefUnwindSafe for Prescaler
impl Send for Prescaler
impl Sync for Prescaler
impl Unpin for Prescaler
impl UnwindSafe for Prescaler
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