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_PRESCALER 64 |
| #define | TIMER_HW_BITS 8 |
| #define | DEFINE_TIMER_ISR SIGNAL(SIG_OUTPUT_COMPARE0) |
| #define | TIMER_TICKS_PER_SEC 1000 |
| #define | TIMER_HW_CNT OCR_DIVISOR |
| #define | SIZEOF_HPTIME_T 1 |
| #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..191) = 1 ms. | |
| #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. | |
| typedef uint8_t | hptime_t |
| Type of time expressed in ticks of the hardware high-precision timer. | |
| hptime_t | timer_hw_hpread (void) |
| void | timer_hw_init (void) |
| HW dependent timer initialization. | |
Detailed Description
Low-level timer module for AVR (interface).
- Version:
- Id
- timer_avr.h 2863 2009-09-02 15:16:09Z batt
Definition in file timer_avr.h.
Define Documentation
| #define TIMER_HW_HPTICKS_PER_SEC DIV_ROUND(CPU_FREQ, TIMER_PRESCALER) |
Frequency of the hardware high precision timer.
Definition at line 158 of file timer_avr.h.
