summaryrefslogtreecommitdiff
path: root/tmk_core/common
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-12-11 19:36:00 +0000
committerDrashna Jaelre <drashna@live.com>2019-12-11 11:36:00 -0800
commit071eb2478f039e21effb981a8a98e6181238b53b (patch)
tree061ba39b3de6080bac9adb2a3a0922624d8d047c /tmk_core/common
parent770a4ee7291095aaa6548d3e988633bf2ae6e6c0 (diff)
downloadqmk_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')
-rw-r--r--tmk_core/common/mbed/bootloader.c3
-rw-r--r--tmk_core/common/mbed/suspend.c5
-rw-r--r--tmk_core/common/mbed/timer.c23
-rw-r--r--tmk_core/common/mbed/xprintf.cpp50
-rw-r--r--tmk_core/common/mbed/xprintf.h16
-rw-r--r--tmk_core/common/print.h33
-rw-r--r--tmk_core/common/wait.h2
7 files changed, 1 insertions, 131 deletions
diff --git a/tmk_core/common/mbed/bootloader.c b/tmk_core/common/mbed/bootloader.c
deleted file mode 100644
index 88945eb050..0000000000
--- a/tmk_core/common/mbed/bootloader.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "bootloader.h"
-
-void bootloader_jump(void) {}
diff --git a/tmk_core/common/mbed/suspend.c b/tmk_core/common/mbed/suspend.c
deleted file mode 100644
index 3d0554f87b..0000000000
--- a/tmk_core/common/mbed/suspend.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdbool.h>
-
-void suspend_power_down(void) {}
-bool suspend_wakeup_condition(void) { return true; }
-void suspend_wakeup_init(void) {}
diff --git a/tmk_core/common/mbed/timer.c b/tmk_core/common/mbed/timer.c
deleted file mode 100644
index 7e4070af29..0000000000
--- a/tmk_core/common/mbed/timer.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "cmsis.h"
-#include "timer.h"
-
-/* Mill second tick count */
-volatile uint32_t timer_count = 0;
-
-/* Timer interrupt handler */
-void SysTick_Handler(void) { timer_count++; }
-
-void timer_init(void) {
- timer_count = 0;
- SysTick_Config(SystemCoreClock / 1000); /* 1ms tick */
-}
-
-void timer_clear(void) { timer_count = 0; }
-
-uint16_t timer_read(void) { return (uint16_t)(timer_count & 0xFFFF); }
-
-uint32_t timer_read32(void) { return timer_count; }
-
-uint16_t timer_elapsed(uint16_t last) { return TIMER_DIFF_16(timer_read(), last); }
-
-uint32_t timer_elapsed32(uint32_t last) { return TIMER_DIFF_32(timer_read32(), last); }
diff --git a/tmk_core/common/mbed/xprintf.cpp b/tmk_core/common/mbed/xprintf.cpp
deleted file mode 100644
index 184b7fa7a0..0000000000
--- a/tmk_core/common/mbed/xprintf.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <cstdarg>
-//#include <stdarg.h>
-#include "mbed.h"
-#include "mbed/xprintf.h"
-
-#define STRING_STACK_LIMIT 120
-
-// TODO
-int __xprintf(const char* format, ...) { return 0; }
-
-#if 0
-/* mbed Serial */
-Serial ser(UART_TX, UART_RX);
-
-/* TODO: Need small implementation for embedded */
-int xprintf(const char* format, ...)
-{
- /* copy from mbed/common/RawSerial.cpp */
- std::va_list arg;
- va_start(arg, format);
- int len = vsnprintf(NULL, 0, format, arg);
- if (len < STRING_STACK_LIMIT) {
- char temp[STRING_STACK_LIMIT];
- vsprintf(temp, format, arg);
- ser.puts(temp);
- } else {
- char *temp = new char[len + 1];
- vsprintf(temp, format, arg);
- ser.puts(temp);
- delete[] temp;
- }
- va_end(arg);
- return len;
-
-/* Fail: __builtin_va_arg_pack?
- * https://gcc.gnu.org/onlinedocs/gcc-4.3.5/gcc/Constructing-Calls.html#Constructing-Calls
- void *arg = __builtin_apply_args();
- void *ret = __builtin_apply((void*)(&(ser.printf)), arg, 100);
- __builtin_return(ret)
-*/
-/* Fail: varargs can not be passed to printf
- //int r = ser.printf("test %i\r\n", 123);
- va_list arg;
- va_start(arg, format);
- int r = ser.printf(format, arg);
- va_end(arg);
- return r;
-*/
-}
-#endif
diff --git a/tmk_core/common/mbed/xprintf.h b/tmk_core/common/mbed/xprintf.h
deleted file mode 100644
index e27822d3a8..0000000000
--- a/tmk_core/common/mbed/xprintf.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef XPRINTF_H
-#define XPRINTF_H
-
-//#define xprintf(format, ...) __xprintf(format, ##__VA_ARGS__)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int __xprintf(const char *format, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h
index 20189838fe..04ca558109 100644
--- a/tmk_core/common/print.h
+++ b/tmk_core/common/print.h
@@ -128,38 +128,7 @@ extern "C"
# endif /* USER_PRINT / NORMAL PRINT */
-# elif defined(__arm__) /* __arm__ */
-
-# include "mbed/xprintf.h"
-
-# ifdef USER_PRINT /* USER_PRINT */
-
-// Remove normal print defines
-# define print(s)
-# define println(s)
-# define xprintf(fmt, ...)
-
-// Create user print defines
-# define uprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__)
-# define uprint(s) xprintf(s)
-# define uprintln(s) xprintf(s "\r\n")
-
-# else /* NORMAL PRINT */
-
-// Create user & normal print defines
-# define xprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__)
-# define print(s) xprintf(s)
-# define println(s) xprintf(s "\r\n")
-# define uprint(s) print(s)
-# define uprintln(s) println(s)
-# define uprintf(fmt, ...) xprintf(fmt, ##__VA_ARGS__)
-
-# endif /* USER_PRINT / NORMAL PRINT */
-
-/* TODO: to select output destinations: UART/USBSerial */
-# define print_set_sendchar(func)
-
-# endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM / __arm__ */
+# endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM */
// User print disables the normal print messages in the body of QMK/TMK code and
// is meant as a lightweight alternative to NOPRINT. Use it when you only want to do
diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h
index cb1f386a61..c82cd2d65a 100644
--- a/tmk_core/common/wait.h
+++ b/tmk_core/common/wait.h
@@ -33,8 +33,6 @@ extern "C" {
# include "clks.h"
# define wait_ms(ms) CLK_delay_ms(ms)
# define wait_us(us) CLK_delay_us(us)
-#elif defined(__arm__)
-# include "wait_api.h"
#else // Unit tests
void wait_ms(uint32_t ms);
# define wait_us(us) wait_ms(us / 1000)