#include <general.h>
Go to the source code of this file.
Functions | |
void | initTimer (void) |
void | resetTimer (void) |
WORD | getTime (WORD *time) |
void | setTime (WORD *time, WORD value) |
Responsible for timer related functions such as heartbeat. The functions in this file are platform dependent
|
This function returns the correct value of the actual time. If the time would be read without this function, its possible to get the wrong time, because the interrupt service routine could be executed during reading this value, and the LSB of the time value is incremented, so an overflow of the LSB occrues, and the program read the wrong value.
|
|
Initiates the timer. Normally the timer should create an overflow every 1ms. but on linux it is a bit complicated to do this. Thats the reason why it only generates an overflow every 100ms at the moment |
|
Resets the timer. This is mainly needed for microcontrollers where interrupt flags have to be set back and initial values for the timer registers have to be set. |
|
This function sets the correct value of the actual time. If the time would be written without this function, its possible to set the wrong time, because the interrupt service routine could be executed during writing this value.
|