timer.c File Reference
#include "main.h"
#include "timer.h"
Include dependency graph for timer.c:

Go to the source code of this file.

Functions

void initTimer2 (void)
 Initializes Timer2. More...
 
void initTimer4 ()
 Initializes Timer4 as a 1ms, 16-bit timer. More...
 
void __attribute__ ((__interrupt__, no_auto_psv))
 Timer4 interrupt. More...
 
long unsigned int getTime ()
 Get current time in ms. More...
 

Variables

static unsigned long int time = 0
 

Function Documentation

void __attribute__ ( (__interrupt__, no_auto_psv)  )

Timer4 interrupt.

Executed every ms

Definition at line 49 of file timer.c.

long unsigned int getTime ( )

Get current time in ms.

Returns
ms

Definition at line 54 of file timer.c.

Here is the caller graph for this function:

void initTimer2 ( void  )

Initializes Timer2.

Its used as a 16-bit timer

Definition at line 16 of file timer.c.

Here is the caller graph for this function:

void initTimer4 ( void  )

Initializes Timer4 as a 1ms, 16-bit timer.

Initializes Timer4.

Definition at line 33 of file timer.c.

Here is the caller graph for this function:

Variable Documentation

unsigned long int time = 0
static

Definition at line 11 of file timer.c.