]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - tmk_core/common/chibios/timer.c
make some change to complie stm32_f103_onekey with new version of Chibios (#583)
[max/tmk_keyboard.git] / tmk_core / common / chibios / timer.c
1 #include "ch.h"
2
3 #include "timer.h"
4
5 void timer_init(void) {}
6
7 void timer_clear(void) {}
8
9 uint16_t timer_read(void)
10 {
11     return (uint16_t)TIME_I2MS(chVTGetSystemTime());
12 }
13
14 uint32_t timer_read32(void)
15 {
16     return TIME_I2MS(chVTGetSystemTime());
17 }
18
19 uint16_t timer_elapsed(uint16_t last)
20 {
21     return (uint16_t)(TIME_I2MS(chVTTimeElapsedSinceX(TIME_MS2I(last))));
22 }
23
24 uint32_t timer_elapsed32(uint32_t last)
25 {
26     return TIME_I2MS(chVTTimeElapsedSinceX(TIME_MS2I(last)));
27 }