Struct sodaq_sara_aff::timer_params::TimerParams
source · pub struct TimerParams {
pub divider: u16,
pub cycles: u32,
}
Expand description
Helper type for computing cycles and divider given frequency
Fields§
§divider: u16
§cycles: u32
Implementations§
source§impl TimerParams
impl TimerParams
sourcepub fn new<T>(timeout: T, src_freq: u32) -> TimerParamswhere
T: Into<Hertz>,
pub fn new<T>(timeout: T, src_freq: u32) -> TimerParamswhere T: Into<Hertz>,
calculates TimerParams from a given frequency based timeout.
sourcepub fn new_us<T>(timeout: T, src_freq: u32) -> TimerParamswhere
T: Into<Nanoseconds>,
pub fn new_us<T>(timeout: T, src_freq: u32) -> TimerParamswhere T: Into<Nanoseconds>,
calculates TimerParams from a given period based timeout.
Trait Implementations§
source§impl Clone for TimerParams
impl Clone for TimerParams
source§fn clone(&self) -> TimerParams
fn clone(&self) -> TimerParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TimerParams
impl Debug for TimerParams
impl Copy for TimerParams
Auto Trait Implementations§
impl RefUnwindSafe for TimerParams
impl Send for TimerParams
impl Sync for TimerParams
impl Unpin for TimerParams
impl UnwindSafe for TimerParams
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