tm4c129x-hal 0.9.3

HAL for the TM4C129x family of microcontrollers
Documentation
//! Time units

pub use tm4c_hal::time::*;

use crate::sysctl::Clocks;

impl MonoTimer {
    /// Creates a new `Monotonic` timer
    pub fn new(mut dwt: DWT, clocks: Clocks) -> Self {
        dwt.enable_cycle_counter();

        // now the CYCCNT counter can't be stopped or resetted
        drop(dwt);

        MonoTimer {
            frequency: clocks.sysclk(),
        }
    }
}