timer_avr.h File Reference
Low-level timer module for AVR (interface). More...
#include <hw/hw_cpufreq.h>
#include "cfg/cfg_timer.h"
#include <cfg/compiler.h>
#include <cfg/macros.h>
#include <avr/io.h>
#include <avr/interrupt.h>
Go to the source code of this file.
Values for CONFIG_TIMER. | |
| Select which hardware timer interrupt to use for system clock and softtimers.
| |
| #define | TIMER_ON_OUTPUT_COMPARE0 1 |
| #define | TIMER_ON_OVERFLOW1 2 |
| #define | TIMER_ON_OUTPUT_COMPARE2 3 |
| #define | TIMER_ON_OVERFLOW3 4 |
| #define | TIMER_DEFAULT TIMER_ON_OUTPUT_COMPARE0 |
| Default system timer. | |
| #define | TIMER_HW_HPTICKS_PER_SEC DIV_ROUND(CPU_FREQ, TIMER_PRESCALER) |
| Frequency of the hardware high precision timer. | |
| #define | OCR_DIVISOR (DIV_ROUND(DIV_ROUND(CPU_FREQ, TIMER_PRESCALER), TIMER_TICKS_PER_SEC) - 1) |
| System timer: additional division after the prescaler 12288000 / 64 / 192 (0. | |
| #define | timer_hw_irq() do {} while (0) |
| Not needed, IRQ timer flag cleared automatically. | |
| #define | timer_hw_triggered() (true) |
| Not needed, timer IRQ handler called only for timer source. | |
| void | timer_hw_init (void) |
| HW dependent timer initialization. | |
Detailed Description
Low-level timer module for AVR (interface).
- Version:
- Id
- timer_avr.h 2546 2009-04-17 15:15:31Z batt
Definition in file timer_avr.h.
Define Documentation
| #define OCR_DIVISOR (DIV_ROUND(DIV_ROUND(CPU_FREQ, TIMER_PRESCALER), TIMER_TICKS_PER_SEC) - 1) |
System timer: additional division after the prescaler 12288000 / 64 / 192 (0.
.191) = 1 ms
Definition at line 160 of file timer_avr.h.
| #define TIMER_HW_HPTICKS_PER_SEC DIV_ROUND(CPU_FREQ, TIMER_PRESCALER) |
