From c670bdca1ae87c227373eba3cdcc62867f6ab153 Mon Sep 17 00:00:00 2001 From: Guillaume Revaillot Date: Tue, 27 Mar 2018 18:30:36 +0200 Subject: [PATCH] stm32l0: enable iwdg --- include/libopencm3/stm32/iwdg.h | 2 ++ include/libopencm3/stm32/l0/iwdg.h | 36 ++++++++++++++++++++++++++++++ lib/stm32/l0/Makefile | 1 + lib/stm32/l0/iwdg.c | 31 +++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 include/libopencm3/stm32/l0/iwdg.h create mode 100644 lib/stm32/l0/iwdg.c diff --git a/include/libopencm3/stm32/iwdg.h b/include/libopencm3/stm32/iwdg.h index a9012225..769a84f7 100644 --- a/include/libopencm3/stm32/iwdg.h +++ b/include/libopencm3/stm32/iwdg.h @@ -30,6 +30,8 @@ # include #elif defined(STM32F4) # include +#elif defined(STM32L0) +# include #elif defined(STM32L1) # include #elif defined(STM32L4) diff --git a/include/libopencm3/stm32/l0/iwdg.h b/include/libopencm3/stm32/l0/iwdg.h new file mode 100644 index 00000000..b56c391d --- /dev/null +++ b/include/libopencm3/stm32/l0/iwdg.h @@ -0,0 +1,36 @@ +/** @defgroup iwdg_defines IWDG Defines + * + * @brief Defined Constants and Types for the STM32L0xx Independent Watchdog + * Timer + * + * @ingroup STM32L0xx_defines + * + * @version 1.0.0 + * + * @date 28 March 2018 + * + * 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_IWDG_H +#define LIBOPENCM3_IWDG_H + +#include + +#endif diff --git a/lib/stm32/l0/Makefile b/lib/stm32/l0/Makefile index 358bbacf..7ee5722e 100644 --- a/lib/stm32/l0/Makefile +++ b/lib/stm32/l0/Makefile @@ -48,6 +48,7 @@ OBJS += flash.o flash_common_l01.o OBJS += i2c_common_v2.o OBJS += rng_common_v1.o OBJS += usart_common_all.o usart_common_v2.o +OBJS += iwdg_common_all.o OBJS += usb.o usb_control.o usb_standard.o OBJS += st_usbfs_core.o st_usbfs_v2.o diff --git a/lib/stm32/l0/iwdg.c b/lib/stm32/l0/iwdg.c new file mode 100644 index 00000000..40beaecb --- /dev/null +++ b/lib/stm32/l0/iwdg.c @@ -0,0 +1,31 @@ +/** @defgroup iwdg_file IWDG + +@ingroup STM32l0xx + +@brief libopencm3 STM32L0xx Independent Watchdog Timer + +@version 1.0.0 + +@date 28 March 2018 + +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 . + */ + +#include