]> git.tdb.fi Git - model-railway-devices.git/blob - common/timer.h
Add support for S88 feedback modules
[model-railway-devices.git] / common / timer.h
1 #ifndef TIMER_H_
2 #define TIMER_H_
3
4 #include <avr/interrupt.h>
5
6 #define TIMER_SET_CALLBACK(n, f) \
7         ISR(TIMER ## n ## _COMPA_vect) \
8         { \
9                 f(); \
10         }
11
12 void timer_start_hz(uint8_t, uint32_t, uint8_t);
13 void timer_start_us(uint8_t, uint32_t);
14 void timer_stop(uint8_t);
15
16 #endif