From a753bbdd6451f6fdeedec91feb6be98ea5f735db Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Sat, 17 Mar 2012 17:33:26 -0700 Subject: [PATCH] [stm32] more platform support --- platform/stm32f1xx/init.c | 34 ++++++++++++++++++++++++++++++++++ platform/stm32f1xx/rules.mk | 1 + platform/stm32f1xx/timer.c | 9 +++++++++ 3 files changed, 44 insertions(+) create mode 100644 platform/stm32f1xx/init.c diff --git a/platform/stm32f1xx/init.c b/platform/stm32f1xx/init.c new file mode 100644 index 00000000..4c106f0a --- /dev/null +++ b/platform/stm32f1xx/init.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012 Travis Geiselbrecht + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#include +#include +#include + +void platform_early_init(void) +{ +} + +void platform_init(void) +{ +} + diff --git a/platform/stm32f1xx/rules.mk b/platform/stm32f1xx/rules.mk index 75dc5504..93551c64 100644 --- a/platform/stm32f1xx/rules.mk +++ b/platform/stm32f1xx/rules.mk @@ -18,6 +18,7 @@ INCLUDES += \ -I$(LOCAL_DIR)/include OBJS += \ + $(LOCAL_DIR)/init.o \ $(LOCAL_DIR)/debug.o \ $(LOCAL_DIR)/timer.o \ diff --git a/platform/stm32f1xx/timer.c b/platform/stm32f1xx/timer.c index c8a0d9bb..8db60bc5 100644 --- a/platform/stm32f1xx/timer.c +++ b/platform/stm32f1xx/timer.c @@ -20,16 +20,25 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include #include #include +#include time_t current_time(void) { + PANIC_UNIMPLEMENTED; return 0; } bigtime_t current_time_hires(void) { + PANIC_UNIMPLEMENTED; return 0; } +status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg, time_t interval) +{ + PANIC_UNIMPLEMENTED; +} +