]> git.gir.st - tmk_keyboard.git/blob - timer.h
Synchronous USART support for PS/2 on V-USB stack
[tmk_keyboard.git] / timer.h
1 #ifndef TIMER_H
2 #define TIMER_H 1
3
4 #include <stdint.h>
5
6 #define TIMER_DIFF(a, b) ((a) >= (b) ? (a) - (b) : UINT16_MAX - (b) + (a))
7
8
9 extern volatile uint16_t timer_count;
10
11
12 void timer_init(void);
13 void timer_clear(void);
14 uint16_t timer_read(void);
15 uint16_t timer_elapsed(uint16_t last);
16
17 #endif
Imprint / Impressum