/* * ======== Clock_tickStart ======== */ Void Clock_tickStart() { if (CLOCK_TICK_SOURCE == Clock_TickSource_TIMER) { if (CLOCK_TICK_MODE != Clock_TickMode_DYNAMIC) { Clock_TimerProxy_start(Clock_module->timer); } } }
/* * ======== switchToTimerA ======== * * Use 1ms Timer_A interrupt to drive the Clock tick * By default, the Timer_A Hwi object has already been * statically created and configured to call Clock_tick(). * Simply stop the watchdog timer and restart the Timer_A. */ static void switchToTimerA() { Clock_TimerProxy_Handle clockTimer; /* Stop watchdog Timer */ MAP_WDT_A_holdTimer(); /* Re-start Timer_A */ clockTimer = Clock_getTimerHandle(); Clock_TimerProxy_start(clockTimer); /* hence, Clock_tick() will be called from 1ms Timer_A interrupt */ }