pub struct TimerConfig {
pub clock_source: ClockSource,
pub direction: CountDirection,
pub resolution: Hertz,
pub intr_priority: i32,
pub intr_shared: bool,
pub allow_pd: bool,
/* private fields */
}Expand description
Configuration for TimerDriver
Fields§
§clock_source: ClockSourceGPTimer clock source
direction: CountDirectionCount direction
resolution: HertzCounter resolution (working frequency) in Hz, hence, the step size of each count tick equals to (1 / resolution_hz) seconds
intr_priority: i32GPTimer interrupt priority, if set to 0, the driver will try to allocate an interrupt with a relative low priority (1,2,3)
If set true, the timer interrupt number can be shared with other peripherals
allow_pd: boolIf set, driver allows the power domain to be powered off when system enters sleep mode. This can save power, but at the expense of more RAM being consumed to save register context.
Trait Implementations§
Source§impl Clone for TimerConfig
impl Clone for TimerConfig
Source§fn clone(&self) -> TimerConfig
fn clone(&self) -> TimerConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimerConfig
impl Debug for TimerConfig
Auto Trait Implementations§
impl Freeze for TimerConfig
impl RefUnwindSafe for TimerConfig
impl Send for TimerConfig
impl Sync for TimerConfig
impl Unpin for TimerConfig
impl UnsafeUnpin for TimerConfig
impl UnwindSafe for TimerConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)