Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Revaillot <revaillot@archos.com>2019-06-18 15:06:09 +0300
committerGuillaume Revaillot <revaillot@archos.com>2019-07-05 11:48:55 +0300
commit811aebf09600642ac3076192bf35eafc7370582b (patch)
treeeaf7b614a465e2d62444143e9163ce7867202cdc
parent2975c3151a8a515b4d67a9a2081b9d4adf004cc9 (diff)
stm32: lptimer: enable lptimer.h usage on f4,f7,l4 and g0 chips.
-rw-r--r--include/libopencm3/stm32/f4/lptimer.h46
-rw-r--r--include/libopencm3/stm32/f7/lptimer.h46
-rw-r--r--include/libopencm3/stm32/g0/lptimer.h47
-rw-r--r--include/libopencm3/stm32/l4/lptimer.h47
-rw-r--r--include/libopencm3/stm32/lptimer.h10
5 files changed, 195 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/f4/lptimer.h b/include/libopencm3/stm32/f4/lptimer.h
new file mode 100644
index 00000000..97203ad9
--- /dev/null
+++ b/include/libopencm3/stm32/f4/lptimer.h
@@ -0,0 +1,46 @@
+/** @defgroup lptimer_defines LPTIM Defines
+ *
+ * @ingroup STM32F4xx_defines
+ *
+ * @brief <b>libopencm3 Defined Constants and Types for the STM32F4xx Low Power Timer</b>
+ *
+ * @version 1.0.0
+ *
+ * LGPL License Terms @ref lgpl_license
+ * */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2019 Guillaume Revaillot <g.revaillot@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBOPENCM3_LPTIMER_H
+#define LIBOPENCM3_LPTIMER_H
+/**@{*/
+
+#include <libopencm3/stm32/common/lptimer_common_all.h>
+
+/** @defgroup lptim_reg_base Low Power Timer register base addresses
+@{*/
+#define LPTIM1 LPTIM1_BASE
+/**@}*/
+
+BEGIN_DECLS
+
+END_DECLS
+
+/**@}*/
+#endif
diff --git a/include/libopencm3/stm32/f7/lptimer.h b/include/libopencm3/stm32/f7/lptimer.h
new file mode 100644
index 00000000..4c721af6
--- /dev/null
+++ b/include/libopencm3/stm32/f7/lptimer.h
@@ -0,0 +1,46 @@
+/** @defgroup lptimer_defines LPTIM Defines
+ *
+ * @ingroup STM32F7xx_defines
+ *
+ * @brief <b>libopencm3 Defined Constants and Types for the STM32F7xx Low Power Timer</b>
+ *
+ * @version 1.0.0
+ *
+ * LGPL License Terms @ref lgpl_license
+ * */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2019 Guillaume Revaillot <g.revaillot@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBOPENCM3_LPTIMER_H
+#define LIBOPENCM3_LPTIMER_H
+/**@{*/
+
+#include <libopencm3/stm32/common/lptimer_common_all.h>
+
+/** @defgroup lptim_reg_base Low Power Timer register base addresses
+@{*/
+#define LPTIM1 LPTIM1_BASE
+/**@}*/
+
+BEGIN_DECLS
+
+END_DECLS
+
+/**@}*/
+#endif
diff --git a/include/libopencm3/stm32/g0/lptimer.h b/include/libopencm3/stm32/g0/lptimer.h
new file mode 100644
index 00000000..183f9b4e
--- /dev/null
+++ b/include/libopencm3/stm32/g0/lptimer.h
@@ -0,0 +1,47 @@
+/** @defgroup lptimer_defines LPTIM Defines
+ *
+ * @ingroup STM32G0xx_defines
+ *
+ * @brief <b>libopencm3 Defined Constants and Types for the STM32G0xx Low Power Timer</b>
+ *
+ * @version 1.0.0
+ *
+ * LGPL License Terms @ref lgpl_license
+ * */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2019 Guillaume Revaillot <g.revaillot@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBOPENCM3_LPTIMER_H
+#define LIBOPENCM3_LPTIMER_H
+/**@{*/
+
+#include <libopencm3/stm32/common/lptimer_common_all.h>
+
+/** @defgroup lptim_reg_base Low Power Timer register base addresses
+@{*/
+#define LPTIM1 LPTIM1_BASE
+#define LPTIM2 LPTIM2_BASE
+/**@}*/
+
+BEGIN_DECLS
+
+END_DECLS
+
+/**@}*/
+#endif
diff --git a/include/libopencm3/stm32/l4/lptimer.h b/include/libopencm3/stm32/l4/lptimer.h
new file mode 100644
index 00000000..1dc78c9d
--- /dev/null
+++ b/include/libopencm3/stm32/l4/lptimer.h
@@ -0,0 +1,47 @@
+/** @defgroup lptimer_defines LPTIM Defines
+ *
+ * @ingroup STM32L4xx_defines
+ *
+ * @brief <b>libopencm3 Defined Constants and Types for the STM32L4xx Low Power Timer</b>
+ *
+ * @version 1.0.0
+ *
+ * LGPL License Terms @ref lgpl_license
+ * */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2019 Guillaume Revaillot <g.revaillot@gmail.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBOPENCM3_LPTIMER_H
+#define LIBOPENCM3_LPTIMER_H
+/**@{*/
+
+#include <libopencm3/stm32/common/lptimer_common_all.h>
+
+/** @defgroup lptim_reg_base Low Power Timer register base addresses
+@{*/
+#define LPTIM1 LPTIM1_BASE
+#define LPTIM2 LPTIM2_BASE
+/**@}*/
+
+BEGIN_DECLS
+
+END_DECLS
+
+/**@}*/
+#endif
diff --git a/include/libopencm3/stm32/lptimer.h b/include/libopencm3/stm32/lptimer.h
index 3dedae59..f2c6b972 100644
--- a/include/libopencm3/stm32/lptimer.h
+++ b/include/libopencm3/stm32/lptimer.h
@@ -22,8 +22,16 @@
#include <libopencm3/cm3/common.h>
#include <libopencm3/stm32/memorymap.h>
-#if defined(STM32L0)
+#if defined(STM32F4)
+# include <libopencm3/stm32/f4/lptimer.h>
+#elif defined(STM32F7)
+# include <libopencm3/stm32/f7/lptimer.h>
+#elif defined(STM32L0)
# include <libopencm3/stm32/l0/lptimer.h>
+#elif defined(STM32L4)
+# include <libopencm3/stm32/l4/lptimer.h>
+#elif defined(STM32G0)
+# include <libopencm3/stm32/g0/lptimer.h>
#else
# error "stm32 family not defined."
#endif