fremoclock  1_3A01
FREMO Clock - Software for UTG
SysHwTimer.h File Reference

Hardware dependent timer module for Atmel AVR. More...

Go to the source code of this file.

Macros

#define TIMER_RESOLUTION_MS   1
 Resolution of this timer in milliseconds. More...
 

Functions

void HwTimerInit (void)
 Initialize the hardware time. More...
 
uint32_t HwTimerGetValue (void)
 Get the value of globalTimer variable guarded by disable/enable interrupts. More...
 

Detailed Description

Hardware dependent timer module for Atmel AVR.

Supplies a tick count.

History:

  • 2002-12-14 sb:Stolen idea and prototypes from TD. and implemented Atmel AVR version.
  • 2007-01-01 ba: Copied from sb HwTimer and modified to get a timertick of 1mS as precise as possible. For a first step we use Timer0 in outputcapture- mode. The function names have not been changed for ease of use with sb timer.h
  • 2007-01-27 ba: Added declarations and functions for FREMOClock
  • 2007-02-25 ba: Removed all specific functions and code. Only PushButton and SysTimerUserInterupt are called. All user specific code should be added in SysTimerUserInterupt.
  • 2015-04-24 StS: Remove unnecessary whitespace and change to unified format
Version
$Id: SysHwTimer.h 159 2016-09-03 06:51:47Z pischky $
Author
Stefan Bormann
Bernd Wisotzki

Definition in file SysHwTimer.h.

Macro Definition Documentation

#define TIMER_RESOLUTION_MS   1

Resolution of this timer in milliseconds.

Change to appropriate value.

Definition at line 49 of file SysHwTimer.h.

Function Documentation

uint32_t HwTimerGetValue ( void  )

Get the value of globalTimer variable guarded by disable/enable interrupts.

Returns
the value of globalTimer

Definition at line 210 of file SysHwTimer.c.

void HwTimerInit ( void  )

Initialize the hardware time.

Called from main before interrupts are enabled .

Definition at line 115 of file SysHwTimer.c.