diff options
Diffstat (limited to 'tmk_core/common/mbed')
-rw-r--r-- | tmk_core/common/mbed/bootloader.c | 1 | ||||
-rw-r--r-- | tmk_core/common/mbed/suspend.c | 1 | ||||
-rw-r--r-- | tmk_core/common/mbed/timer.c | 32 | ||||
-rw-r--r-- | tmk_core/common/mbed/xprintf.cpp | 5 | ||||
-rw-r--r-- | tmk_core/common/mbed/xprintf.h | 1 |
5 files changed, 9 insertions, 31 deletions
diff --git a/tmk_core/common/mbed/bootloader.c b/tmk_core/common/mbed/bootloader.c index b51e83943..88945eb05 100644 --- a/tmk_core/common/mbed/bootloader.c +++ b/tmk_core/common/mbed/bootloader.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #include "bootloader.h" | 1 | #include "bootloader.h" |
2 | 2 | ||
3 | |||
4 | void bootloader_jump(void) {} | 3 | void bootloader_jump(void) {} |
diff --git a/tmk_core/common/mbed/suspend.c b/tmk_core/common/mbed/suspend.c index 32651574f..3d0554f87 100644 --- a/tmk_core/common/mbed/suspend.c +++ b/tmk_core/common/mbed/suspend.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include <stdbool.h> | 1 | #include <stdbool.h> |
2 | 2 | ||
3 | |||
4 | void suspend_power_down(void) {} | 3 | void suspend_power_down(void) {} |
5 | bool suspend_wakeup_condition(void) { return true; } | 4 | bool suspend_wakeup_condition(void) { return true; } |
6 | void suspend_wakeup_init(void) {} | 5 | void suspend_wakeup_init(void) {} |
diff --git a/tmk_core/common/mbed/timer.c b/tmk_core/common/mbed/timer.c index c357ceb78..7e4070af2 100644 --- a/tmk_core/common/mbed/timer.c +++ b/tmk_core/common/mbed/timer.c | |||
@@ -5,37 +5,19 @@ | |||
5 | volatile uint32_t timer_count = 0; | 5 | volatile uint32_t timer_count = 0; |
6 | 6 | ||
7 | /* Timer interrupt handler */ | 7 | /* Timer interrupt handler */ |
8 | void SysTick_Handler(void) { | 8 | void SysTick_Handler(void) { timer_count++; } |
9 | timer_count++; | ||
10 | } | ||
11 | 9 | ||
12 | void timer_init(void) | 10 | void timer_init(void) { |
13 | { | ||
14 | timer_count = 0; | 11 | timer_count = 0; |
15 | SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */ | 12 | SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */ |
16 | } | 13 | } |
17 | 14 | ||
18 | void timer_clear(void) | 15 | void timer_clear(void) { timer_count = 0; } |
19 | { | ||
20 | timer_count = 0; | ||
21 | } | ||
22 | 16 | ||
23 | uint16_t timer_read(void) | 17 | uint16_t timer_read(void) { return (uint16_t)(timer_count & 0xFFFF); } |
24 | { | ||
25 | return (uint16_t)(timer_count & 0xFFFF); | ||
26 | } | ||
27 | 18 | ||
28 | uint32_t timer_read32(void) | 19 | uint32_t timer_read32(void) { return timer_count; } |
29 | { | ||
30 | return timer_count; | ||
31 | } | ||
32 | 20 | ||
33 | uint16_t timer_elapsed(uint16_t last) | 21 | uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); } |
34 | { | ||
35 | return TIMER_DIFF_16(timer_read(), last); | ||
36 | } | ||
37 | 22 | ||
38 | uint32_t timer_elapsed32(uint32_t last) | 23 | uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), last); } |
39 | { | ||
40 | return TIMER_DIFF_32(timer_read32(), last); | ||
41 | } | ||
diff --git a/tmk_core/common/mbed/xprintf.cpp b/tmk_core/common/mbed/xprintf.cpp index b1aac2c99..184b7fa7a 100644 --- a/tmk_core/common/mbed/xprintf.cpp +++ b/tmk_core/common/mbed/xprintf.cpp | |||
@@ -3,10 +3,9 @@ | |||
3 | #include "mbed.h" | 3 | #include "mbed.h" |
4 | #include "mbed/xprintf.h" | 4 | #include "mbed/xprintf.h" |
5 | 5 | ||
6 | #define STRING_STACK_LIMIT 120 | ||
6 | 7 | ||
7 | #define STRING_STACK_LIMIT 120 | 8 | // TODO |
8 | |||
9 | //TODO | ||
10 | int __xprintf(const char* format, ...) { return 0; } | 9 | int __xprintf(const char* format, ...) { return 0; } |
11 | 10 | ||
12 | #if 0 | 11 | #if 0 |
diff --git a/tmk_core/common/mbed/xprintf.h b/tmk_core/common/mbed/xprintf.h index 1e7a48c06..e27822d3a 100644 --- a/tmk_core/common/mbed/xprintf.h +++ b/tmk_core/common/mbed/xprintf.h | |||
@@ -13,5 +13,4 @@ int __xprintf(const char *format, ...); | |||
13 | } | 13 | } |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | |||
17 | #endif | 16 | #endif |