From 0aef9c2ec68c089624f67c2bdfd5816dad81424c Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 22 May 2019 00:10:39 +0000 Subject: [PATCH] stm32: doc: pwr: move to peripheral_api Some families had partially moved to peripheral api, and others were only documenting common code, but not specific code. Delete dummy .c files, and check that all specific apis are also being documented, not just common apis. --- include/libopencm3/stm32/f7/pwr.h | 2 ++ lib/stm32/common/pwr_common_v1.c | 3 ++- lib/stm32/common/pwr_common_v2.c | 3 ++- lib/stm32/f0/Makefile | 2 +- lib/stm32/f0/pwr.c | 38 --------------------------- lib/stm32/f1/pwr.c | 43 ------------------------------- lib/stm32/f2/pwr.c | 39 ---------------------------- lib/stm32/f3/Makefile | 2 +- lib/stm32/f3/pwr.c | 40 ---------------------------- lib/stm32/f4/pwr.c | 8 ++++-- lib/stm32/f7/pwr.c | 8 ++++-- lib/stm32/g0/pwr.c | 3 ++- lib/stm32/l4/pwr.c | 4 +-- 13 files changed, 24 insertions(+), 171 deletions(-) delete mode 100644 lib/stm32/f0/pwr.c delete mode 100644 lib/stm32/f1/pwr.c delete mode 100644 lib/stm32/f2/pwr.c delete mode 100644 lib/stm32/f3/pwr.c diff --git a/include/libopencm3/stm32/f7/pwr.h b/include/libopencm3/stm32/f7/pwr.h index 87477b44..46055710 100644 --- a/include/libopencm3/stm32/f7/pwr.h +++ b/include/libopencm3/stm32/f7/pwr.h @@ -292,4 +292,6 @@ void pwr_disable_overdrive(void); END_DECLS +/**@}*/ + #endif diff --git a/lib/stm32/common/pwr_common_v1.c b/lib/stm32/common/pwr_common_v1.c index 820dfcab..d4c44b3d 100644 --- a/lib/stm32/common/pwr_common_v1.c +++ b/lib/stm32/common/pwr_common_v1.c @@ -1,4 +1,5 @@ -/** @addtogroup pwr_file +/** @addtogroup pwr_file PWR peripheral API +@ingroup peripheral_apis @author @htmlonly © @endhtmlonly 2012 Ken Sarkies diff --git a/lib/stm32/common/pwr_common_v2.c b/lib/stm32/common/pwr_common_v2.c index b895e7d0..940b29e5 100644 --- a/lib/stm32/common/pwr_common_v2.c +++ b/lib/stm32/common/pwr_common_v2.c @@ -1,4 +1,5 @@ -/** @addtogroup pwr_file +/** @addtogroup pwr_file PWR peripheral API + * @ingroup peripheral_apis * * @author @htmlonly © @endhtmlonly 2012 Karl Palsson */ diff --git a/lib/stm32/f0/Makefile b/lib/stm32/f0/Makefile index 5a8333d7..326baac0 100644 --- a/lib/stm32/f0/Makefile +++ b/lib/stm32/f0/Makefile @@ -37,7 +37,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS) ARFLAGS = rcs OBJS = can.o flash.o rcc.o rtc.o comparator.o \ - pwr.o adc.o desig.o + adc.o desig.o OBJS += gpio_common_all.o gpio_common_f0234.o crc_common_all.o crc_v2.o \ pwr_common_v1.o iwdg_common_all.o rtc_common_l1f024.o \ diff --git a/lib/stm32/f0/pwr.c b/lib/stm32/f0/pwr.c deleted file mode 100644 index 8a3ffd2e..00000000 --- a/lib/stm32/f0/pwr.c +++ /dev/null @@ -1,38 +0,0 @@ -/** @defgroup pwr_file PWR - * - * @ingroup STM32F0xx - * - * @brief libopencm3 STM32F0xx Power Control - * - * @version 1.0.0 - * - * @date 11 July 2013 - * - * This library supports the power control system for the - * STM32F0 series of ARM Cortex Microcontrollers by ST Microelectronics. - * - * 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 - -/**@}*/ - diff --git a/lib/stm32/f1/pwr.c b/lib/stm32/f1/pwr.c deleted file mode 100644 index 167f920d..00000000 --- a/lib/stm32/f1/pwr.c +++ /dev/null @@ -1,43 +0,0 @@ -/** @defgroup pwr_file PWR - * - * @ingroup STM32F1xx - * - * @brief libopencm3 STM32F1xx Power Control - * - * @version 1.0.0 - * - * @author @htmlonly © @endhtmlonly 2012 - * Ken Sarkies - * - * @date 18 August 2012 - * - * This library supports the power control system for the - * STM32F1 series of ARM Cortex Microcontrollers by ST Microelectronics. - * - * LGPL License Terms @ref lgpl_license - */ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2012 Ken Sarkies - * - * 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 - -/**@}*/ - diff --git a/lib/stm32/f2/pwr.c b/lib/stm32/f2/pwr.c deleted file mode 100644 index 0e5641eb..00000000 --- a/lib/stm32/f2/pwr.c +++ /dev/null @@ -1,39 +0,0 @@ -/** @defgroup pwr_file PWR - * - * @ingroup STM32F2xx - * - * @brief libopencm3 STM32F2xx Power Control - * - * @version 1.0.0 - * - * @author @htmlonly © @endhtmlonly 2014 - * Ken Sarkies - * - * @date 13 January 2014 - * - * This library supports the power control system for the - * STM32F4 series of ARM Cortex Microcontrollers by ST Microelectronics. - * - * LGPL License Terms @ref lgpl_license - */ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2014 Ken Sarkies - * - * 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 - diff --git a/lib/stm32/f3/Makefile b/lib/stm32/f3/Makefile index 010e14df..362e0cd0 100644 --- a/lib/stm32/f3/Makefile +++ b/lib/stm32/f3/Makefile @@ -37,7 +37,7 @@ TGT_CFLAGS += $(STANDARD_FLAGS) ARFLAGS = rcs -OBJS = rcc.o adc.o can.o pwr.o flash.o desig.o +OBJS = rcc.o adc.o can.o flash.o desig.o OBJS += gpio_common_all.o gpio_common_f0234.o \ dac_common_all.o crc_common_all.o crc_v2.o \ diff --git a/lib/stm32/f3/pwr.c b/lib/stm32/f3/pwr.c deleted file mode 100644 index 3c1a84bd..00000000 --- a/lib/stm32/f3/pwr.c +++ /dev/null @@ -1,40 +0,0 @@ -/** @defgroup pwr_file PWR - * - * @ingroup STM32F3xx - * - * @brief libopencm3 STM32F3xx Power Control - * - * @author @htmlonly © @endhtmlonly 2014 - * Ken Sarkies - * - * @date 13 January 2014 - * - * @version 1.0.0 - * - * @date 11 July 2013 - * - * LGPL License Terms @ref lgpl_license - */ - -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2014 Ken Sarkies - * - * 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 - - diff --git a/lib/stm32/f4/pwr.c b/lib/stm32/f4/pwr.c index 58d9bd19..9bd2f8da 100644 --- a/lib/stm32/f4/pwr.c +++ b/lib/stm32/f4/pwr.c @@ -1,6 +1,6 @@ -/** @defgroup pwr_file PWR +/** @defgroup pwr_file * - * @ingroup STM32F4xx + * @ingroup peripheral_apis * * @brief libopencm3 STM32F4xx Power Control * @@ -36,6 +36,8 @@ #include +/**@{*/ + void pwr_set_vos_scale(enum pwr_vos_scale scale) { uint32_t reg32; @@ -43,3 +45,5 @@ void pwr_set_vos_scale(enum pwr_vos_scale scale) reg32 |= (scale & PWR_CR_VOS_MASK) << PWR_CR_VOS_SHIFT; PWR_CR = reg32; } + +/**@}*/ \ No newline at end of file diff --git a/lib/stm32/f7/pwr.c b/lib/stm32/f7/pwr.c index 93bb845d..cb19bb6a 100644 --- a/lib/stm32/f7/pwr.c +++ b/lib/stm32/f7/pwr.c @@ -1,6 +1,6 @@ -/** @defgroup pwr_file PWR +/** @defgroup pwr_file PWR peripheral API * - * @ingroup STM32F7xx + * @ingroup peripheral_apis * * @brief libopencm3 STM32F7xx Power Control * @@ -38,6 +38,8 @@ #include +/**@{*/ + void pwr_set_vos_scale(enum pwr_vos_scale scale) { PWR_CR1 &= ~PWR_CR1_VOS_MASK; @@ -64,3 +66,5 @@ void pwr_disable_overdrive(void) PWR_CR1 &= ~(PWR_CR1_ODEN | PWR_CR1_ODSWEN); while (!(PWR_CSR1 & PWR_CSR1_ODSWRDY)); } + +/**@}*/ \ No newline at end of file diff --git a/lib/stm32/g0/pwr.c b/lib/stm32/g0/pwr.c index a4c71ad9..32cd535a 100644 --- a/lib/stm32/g0/pwr.c +++ b/lib/stm32/g0/pwr.c @@ -1,4 +1,5 @@ -/** @defgroup pwr_file PWR peripheral APIS +/** @defgroup pwr_file PWR peripheral API + * @ingroup peripheral_apis * * @author @htmlonly © @endhtmlonly 2019 Guillaume Revaillot * diff --git a/lib/stm32/l4/pwr.c b/lib/stm32/l4/pwr.c index 7bfc8361..e6f71296 100644 --- a/lib/stm32/l4/pwr.c +++ b/lib/stm32/l4/pwr.c @@ -1,6 +1,6 @@ -/** @defgroup pwr_file PWR +/** @defgroup pwr_file PWR peripheral API * - * @ingroup STM32L4xx + * @ingroup peripheral_apis * * @brief libopencm3 STM32L4xx Power Control *