diff options
author | Joel Challis <git@zvecr.com> | 2019-12-11 19:36:00 +0000 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-12-11 11:36:00 -0800 |
commit | 071eb2478f039e21effb981a8a98e6181238b53b (patch) | |
tree | 061ba39b3de6080bac9adb2a3a0922624d8d047c /tmk_core/common/mbed/timer.c | |
parent | 770a4ee7291095aaa6548d3e988633bf2ae6e6c0 (diff) | |
download | qmk_firmware-071eb2478f039e21effb981a8a98e6181238b53b.tar.gz qmk_firmware-071eb2478f039e21effb981a8a98e6181238b53b.zip |
Remove mbed files (#7605)
* Remove mbed files
* Remove mbed files - fix comment
* Remove mbed logic blocks
Diffstat (limited to 'tmk_core/common/mbed/timer.c')
-rw-r--r-- | tmk_core/common/mbed/timer.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tmk_core/common/mbed/timer.c b/tmk_core/common/mbed/timer.c deleted file mode 100644 index 7e4070af2..000000000 --- a/tmk_core/common/mbed/timer.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #include "cmsis.h" | ||
2 | #include "timer.h" | ||
3 | |||
4 | /* Mill second tick count */ | ||
5 | volatile uint32_t timer_count = 0; | ||
6 | |||
7 | /* Timer interrupt handler */ | ||
8 | void SysTick_Handler(void) { timer_count++; } | ||
9 | |||
10 | void timer_init(void) { | ||
11 | timer_count = 0; | ||
12 | SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */ | ||
13 | } | ||
14 | |||
15 | void timer_clear(void) { timer_count = 0; } | ||
16 | |||
17 | uint16_t timer_read(void) { return (uint16_t)(timer_count & 0xFFFF); } | ||
18 | |||
19 | uint32_t timer_read32(void) { return timer_count; } | ||
20 | |||
21 | uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); } | ||
22 | |||
23 | uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), last); } | ||