include/timer/timer_xmega.h File Reference

AVR XMEGA Timer. More...

#include <chip/timer.h>
#include <types.h>

Go to the source code of this file.

Data Structures

struct  timer
 Timer data. More...

Defines

#define TIMER_SELECT(func, timer_id,...)   timer##timer_id##_##func##_priv(__VA_ARGS__)
 Select a timer function.
#define timer_init(timer_id, timer, timer_callback)   TIMER_SELECT(init, timer_id, timer, timer_callback)
 Timer initialization.
#define timer_start(timer_id, timer)   TIMER_SELECT(start, timer_id, timer)
 Start the timer.
#define timer_stop(timer_id, timer)   TIMER_SELECT(stop, timer_id, timer)
 Stop the timer.
#define timer_set_alarm(timer_id, timer, delay)   TIMER_SELECT(set_alarm, timer_id, timer, delay)
 Set timer alarm.
#define timer_get_time(timer_id, timer)   TIMER_SELECT(get_time, timer_id, timer)
 Get current timer time stamp.
#define timer_write_resolution(timer_id, timer, timer_resolution)   TIMER_SELECT(write_resolution, timer_id, timer, timer_resolution)
 Set a timer resolution.
#define timer_read_resolution(timer_id, timer)   TIMER_SELECT(read_resolution, timer_id, timer)
 Read the current timer resolution configuration.
#define timer_set_resolution(timer_id, timer, resolution)   TIMER_SELECT(set_resolution, timer_id, timer, resolution)
 Generate a timer resolution configuration.
#define timer_get_resolution(timer_id, timer, timer_resolution)   TIMER_SELECT(get_resolution, timer_id, timer, timer_resolution)
 Convert the timer resolution configuration to ticks per second.
#define timer_maximum_delta(timer_id, timer)   TIMER_SELECT(maximum_delta, timer_id, timer)
 Get the maximum allowed timer delta.

Typedefs

typedef uint8_t timer_res_t
 Driver internal timer resolution type.
typedef void(* timer_callback_t )(struct timer *timer)
 Timer callback function type.

Detailed Description

AVR XMEGA Timer.

This file contains definitions of the three data types needed for use of the Timer driver:

In addition, this file contains macros that expand the function names defined in the API to macro names that contain the TC ID. This is necessary for different implementations for the different timer IDs to be possible.
Each chip has a <chip/timer.h> that in turn define these expanded macros names as the function names of whichever implementations are available for that specific chip.

Do not include this file directly. Include <timer.h> instead.

Copyright (C) 2010 Atmel Corporation. All rights reserved.

Definition in file timer_xmega.h.

Generated on Thu Apr 29 14:09:58 2010 for display-demo by  doxygen 1.6.3