From 62a8aca04a99d796864f7c6e49aa6bb11ce34c2c Mon Sep 17 00:00:00 2001 From: BuFran Date: Wed, 10 Jul 2013 00:07:46 +0200 Subject: [PATCH] [STM32F0:RTC] Add initial support --- include/libopencm3/stm32/f0/rtc.h | 37 +++++++++++++++++++++++++++++++ include/libopencm3/stm32/rtc.h | 4 +++- lib/stm32/f0/Makefile | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 include/libopencm3/stm32/f0/rtc.h diff --git a/include/libopencm3/stm32/f0/rtc.h b/include/libopencm3/stm32/f0/rtc.h new file mode 100644 index 00000000..7b773a71 --- /dev/null +++ b/include/libopencm3/stm32/f0/rtc.h @@ -0,0 +1,37 @@ +/** @defgroup rtc_defines RTC Defines + * + * @brief Defined Constants and Types for the STM32F0xx RTC + * + * @ingroup STM32F0xx_defines + * + * @version 1.0.0 + * + * @date 5 December 2012 + * + * LGPL License Terms @ref lgpl_license + */ + +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#ifndef LIBOPENCM3_RTC_H +#define LIBOPENCM3_RTC_H + +#include +#include + +#endif diff --git a/include/libopencm3/stm32/rtc.h b/include/libopencm3/stm32/rtc.h index a927dd8e..6dbceeac 100644 --- a/include/libopencm3/stm32/rtc.h +++ b/include/libopencm3/stm32/rtc.h @@ -17,7 +17,9 @@ * along with this library. If not, see . */ -#if defined(STM32F1) +#if defined(STM32F0) +# include +#elif defined(STM32F1) # include #elif defined(STM32F2) # include diff --git a/lib/stm32/f0/Makefile b/lib/stm32/f0/Makefile index bf812d41..3c7c0e13 100644 --- a/lib/stm32/f0/Makefile +++ b/lib/stm32/f0/Makefile @@ -36,7 +36,7 @@ ARFLAGS = rcs OBJS = flash.o rcc.o usart.o OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o \ - pwr_common_all.o iwdg_common_all.o + pwr_common_all.o iwdg_common_all.o rtc_common_bcd.o VPATH += ../../usb:../:../../cm3:../common