From cc3a1e8a9889c34d0894524d010b83c22be4e296 Mon Sep 17 00:00:00 2001 From: Mateusz Myalski Date: Sun, 20 Oct 2024 18:53:40 +0200 Subject: [PATCH] Added timer support --- include/libopencm3/stm32/timer.h | 2 ++ include/libopencm3/stm32/u5/timer.h | 36 +++++++++++++++++++++++++++++ lib/stm32/u5/Makefile | 1 + 3 files changed, 39 insertions(+) create mode 100644 include/libopencm3/stm32/u5/timer.h diff --git a/include/libopencm3/stm32/timer.h b/include/libopencm3/stm32/timer.h index a1d10a5c..8a476194 100644 --- a/include/libopencm3/stm32/timer.h +++ b/include/libopencm3/stm32/timer.h @@ -40,6 +40,8 @@ # include #elif defined(STM32L4) # include +#elif defined(STM32U5) +# include #elif defined(STM32G0) # include #elif defined(STM32G4) diff --git a/include/libopencm3/stm32/u5/timer.h b/include/libopencm3/stm32/u5/timer.h new file mode 100644 index 00000000..c98b343d --- /dev/null +++ b/include/libopencm3/stm32/u5/timer.h @@ -0,0 +1,36 @@ +/** @defgroup timer_defines Timer Defines + +@brief libopencm3 Defined Constants and Types for the STM32U5xx Timers + +@ingroup STM32U5xx_defines + +@version 1.0.0 + +@date 20 October 2024 + +@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 . + */ + +#pragma once +#include diff --git a/lib/stm32/u5/Makefile b/lib/stm32/u5/Makefile index f61f5acc..fcd4f3e4 100644 --- a/lib/stm32/u5/Makefile +++ b/lib/stm32/u5/Makefile @@ -35,6 +35,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS) ARFLAGS = rcs +OBJS += timer_common_all.o OBJS += exti_common_all.o OBJS += iwdg_common_all.o OBJS += i2c_common_v2.o