timer_xmega.h File Reference
Low-level timer module for AVR XMEGA (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_USE_TCC0 1 |
| Default system timer. | |
| #define | TIMER_USE_TCC1 2 |
| Default system timer. | |
| #define | TIMER_USE_TCD0 3 |
| Default system timer. | |
| #define | TIMER_USE_TCE0 4 |
| Default system timer. | |
| #define | TIMER_USE_TCD1 0 |
| Default system timer. | |
| #define | TIMER_USE_TCF0 0 |
| Default system timer. | |
| #define | TIMER_USE_TCE1 0 |
| Default system timer. | |
| #define | TIMER_USE_TCF1 0 |
| Default system timer. | |
| #define | TIMER_DEFAULT TIMER_USE_TCC1 |
| Default system timer. | |
| #define | TIMER_OVF_VECT TCD1_OVF_vect |
| Default system timer. | |
| #define | TIMERCOUNTER TCD1 |
| Default system timer. | |
| #define | DEFINE_TIMER_ISR DECLARE_ISR_CONTEXT_SWITCH(TIMER_OVF_VECT) |
| Default system timer. | |
| #define | TIMER_TICKS_PER_SEC 1000 |
| Default system timer. | |
| #define | TIMER_PRESCALER 1 |
| Default system timer. | |
| #define | TIMER_PERIOD_VALUE DIV_ROUND(DIV_ROUND(CPU_FREQ, TIMER_PRESCALER), TIMER_TICKS_PER_SEC) |
| Default system timer. | |
| #define | TIMER_HW_CNT TIMER_PERIOD_VALUE |
| Default system timer. | |
| #define | TIMER_HW_HPTICKS_PER_SEC DIV_ROUND(CPU_FREQ, TIMER_PRESCALER) |
| Frequency of the hardware high precision timer. | |
| #define | SIZEOF_HPTIME_T 2 |
| Default system timer. | |
| #define | timer_hw_irq() do {} while (0) |
| Default system timer. | |
| #define | timer_hw_triggered() (true) |
| Default system timer. | |
| typedef uint16_t | hptime_t |
| Default system timer. | |
| hptime_t | timer_hw_hpread (void) |
| Default system timer. | |
| void | timer_hw_init (void) |
| HW dependent timer initialization. | |
Detailed Description
Low-level timer module for AVR XMEGA (interface).
This file is heavily inspired by the AVR implementation for BeRTOS, but uses a different approach for implementing the different debug ports, by using the timer structs.
Definition in file timer_xmega.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 140 of file timer_xmega.h.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/bertos_logo.png)