]> git.tdb.fi Git - model-railway-devices.git/blob - firmware/timer.h
Rename the project to R²C²
[model-railway-devices.git] / firmware / timer.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2010  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef TIMER_H_
9 #define TIMER_H_
10
11 #include <avr/interrupt.h>
12
13 #define TIMER_SET_CALLBACK(n, f) \
14         ISR(TIMER ## n ## _COMPA_vect) \
15         { \
16                 f(); \
17         }
18
19 void timer_start_hz(uint8_t, uint32_t, uint8_t);
20 void timer_start_us(uint8_t, uint32_t);
21 void timer_stop(uint8_t);
22
23 #endif