From 0b84540ecbbad533e54d3d2159c2120cfffbcdbc Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Fri, 29 Jan 2016 21:11:31 +0000 Subject: [PATCH] stm32l4: add common timer code. --- include/libopencm3/stm32/l4/timer.h | 44 +++++++++++++++++++++++++++++ include/libopencm3/stm32/timer.h | 2 ++ lib/stm32/l4/Makefile | 1 + 3 files changed, 47 insertions(+) create mode 100644 include/libopencm3/stm32/l4/timer.h diff --git a/include/libopencm3/stm32/l4/timer.h b/include/libopencm3/stm32/l4/timer.h new file mode 100644 index 00000000..355c1ca1 --- /dev/null +++ b/include/libopencm3/stm32/l4/timer.h @@ -0,0 +1,44 @@ +/** @defgroup timer_defines Timer Defines + +@brief libopencm3 Defined Constants and Types for the STM32L4xx Timers + +@ingroup STM32L4xx_defines + +@version 1.0.0 + +@date 30 November 2015 + +@author @htmlonly © @endhtmlonly 2015 Karl Palsson + +LGPL License Terms @ref lgpl_license +*/ + +/* + * This file is part of the libopencm3 project. + * + * Copyright (C) 2015 Karl Palsson + * + * 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_TIMER_H +#define LIBOPENCM3_TIMER_H + +#include + +BEGIN_DECLS + +END_DECLS + +#endif diff --git a/include/libopencm3/stm32/timer.h b/include/libopencm3/stm32/timer.h index f16d1085..e5fe248a 100644 --- a/include/libopencm3/stm32/timer.h +++ b/include/libopencm3/stm32/timer.h @@ -36,6 +36,8 @@ # include #elif defined(STM32L1) # include +#elif defined(STM32L4) +# include #else # error "stm32 family not defined." #endif diff --git a/lib/stm32/l4/Makefile b/lib/stm32/l4/Makefile index 836bd8bc..ad9e052e 100644 --- a/lib/stm32/l4/Makefile +++ b/lib/stm32/l4/Makefile @@ -43,6 +43,7 @@ OBJS = adc.o flash.o pwr.o rcc.o OBJS += rcc_common_all.o OBJS += gpio_common_all.o gpio_common_f0234.o OBJS += adc_common_v2.o adc_common_v2_multi.o +OBJS += timer_common_all.o VPATH += ../../usb:../:../../cm3:../common VPATH += ../../ethernet