#include "alarm.h"
Go to the source code of this file.
Defines | |
| #define | CLOCK_BASE_MS 100 |
| resulution of the auxilary timer | |
| #define | SECONDS(s) (((s)*1000)/CLOCK_BASE_MS) |
| #define | MS(s) (s/CLOCK_BASE_MS) |
Functions | |
| void | Timer_Interrupt () |
| void | _os_init_timers () |
Variables | |
| t_counter | T1_counter |
All timers are derived from the CPU clock and a counter which is reset when a certain counter value cnt is reached and some sort of pre and post scaler.
t * Fclock * 1000
cnt = --------------------------
prescale * postscale
t = timer value [ms]
Fclock = timer base in Mhz
postscale / prescale factors according your hardware conf.
The value Fclock depends on your oscillator configuration and is normally Fxtal / 4.
Definition in file timer.h.
1.4.6