From 093edfb8810c03513396abbaeab391d234d21fe9 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Sat, 22 Jun 2019 00:59:05 +0000 Subject: [PATCH] doc: efm32: cmu: move to peripheral_apis Was completely undocumented before. Just needed different tagging so it could be picked up. No attempt at this stage of sharing more code between the cmu modules. --- include/libopencm3/efm32/common/cmu_common.h | 10 ++++++---- include/libopencm3/efm32/ezr32wg/cmu.h | 15 ++++++++++++--- include/libopencm3/efm32/hg/cmu.h | 15 ++++++++++++--- include/libopencm3/efm32/lg/cmu.h | 13 +++++++++---- include/libopencm3/efm32/wg/cmu.h | 13 +++++++++---- lib/efm32/common/cmu_common.c | 7 +++++++ lib/efm32/hg/cmu.c | 7 +++++++ 7 files changed, 62 insertions(+), 18 deletions(-) diff --git a/include/libopencm3/efm32/common/cmu_common.h b/include/libopencm3/efm32/common/cmu_common.h index caac95de..e2005946 100644 --- a/include/libopencm3/efm32/common/cmu_common.h +++ b/include/libopencm3/efm32/common/cmu_common.h @@ -1,3 +1,5 @@ +/** @addtogroup cmu_defines + */ /* * This file is part of the libopencm3 project. * @@ -17,8 +19,9 @@ * along with this library. If not, see . */ -#ifndef LIBOPENCM3_EFM32_CMU_H -#define LIBOPENCM3_EFM32_CMU_H +#pragma once + +/**@{*/ #include #include @@ -701,5 +704,4 @@ void cmu_clock_setup_in_hfxo_out_48mhz(void); END_DECLS -#endif - +/**@}*/ \ No newline at end of file diff --git a/include/libopencm3/efm32/ezr32wg/cmu.h b/include/libopencm3/efm32/ezr32wg/cmu.h index f292ab4f..dd293404 100644 --- a/include/libopencm3/efm32/ezr32wg/cmu.h +++ b/include/libopencm3/efm32/ezr32wg/cmu.h @@ -1,3 +1,11 @@ +/** @defgroup cmu_defines CMU Defines + * + * @brief Defined Constants and Types for the EZR32WG Clock Management Unit + * + * @ingroup EZR32WG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -17,11 +25,12 @@ * along with this library. If not, see . */ -#ifndef LIBOPENCM3_EFM32_EZR32WG_CMU_H -#define LIBOPENCM3_EFM32_EZR32WG_CMU_H +#pragma once #include +/**@{*/ + /* EZR32WG refers to USART0 as USART0RF * because it is connected to the radio MCU. */ @@ -29,4 +38,4 @@ #define CMU_HFPERCLKEN0_USARTRF0 CMU_HFPERCLKEN0_USART0 #define CMU_USARTRF0 CMU_USART0 -#endif +/**@}*/ \ No newline at end of file diff --git a/include/libopencm3/efm32/hg/cmu.h b/include/libopencm3/efm32/hg/cmu.h index 9a9265d3..6d513bf8 100644 --- a/include/libopencm3/efm32/hg/cmu.h +++ b/include/libopencm3/efm32/hg/cmu.h @@ -1,3 +1,11 @@ +/** @defgroup cmu_defines CMU Defines + * + * @brief Defined Constants and Types for the EFM32HG Clock Management Unit + * + * @ingroup EFM32HG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -18,8 +26,9 @@ * along with this library. If not, see . */ -#ifndef LIBOPENCM3_EFM32_CMU_H -#define LIBOPENCM3_EFM32_CMU_H +/**@{*/ + +#pragma once #include #include @@ -673,4 +682,4 @@ void cmu_wait_for_usbclk_selected(enum cmu_osc osc); END_DECLS -#endif +/**@}*/ \ No newline at end of file diff --git a/include/libopencm3/efm32/lg/cmu.h b/include/libopencm3/efm32/lg/cmu.h index a567a30c..93168705 100644 --- a/include/libopencm3/efm32/lg/cmu.h +++ b/include/libopencm3/efm32/lg/cmu.h @@ -1,3 +1,11 @@ +/** @defgroup cmu_defines CMU Defines + * + * @brief Defined Constants and Types for the EFM32LG Clock Management Unit + * + * @ingroup EFM32LG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -17,10 +25,7 @@ * along with this library. If not, see . */ -#ifndef LIBOPENCM3_EFM32_LG_CMU_H -#define LIBOPENCM3_EFM32_LG_CMU_H +#pragma once #include -#endif - diff --git a/include/libopencm3/efm32/wg/cmu.h b/include/libopencm3/efm32/wg/cmu.h index 17701412..6b6b86c7 100644 --- a/include/libopencm3/efm32/wg/cmu.h +++ b/include/libopencm3/efm32/wg/cmu.h @@ -1,3 +1,11 @@ +/** @defgroup cmu_defines CMU Defines + * + * @brief Defined Constants and Types for the EFM32WG Clock Management Unit + * + * @ingroup EFM32WG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -17,9 +25,6 @@ * along with this library. If not, see . */ -#ifndef LIBOPENCM3_EFM32_WG_CMU_H -#define LIBOPENCM3_EFM32_WG_CMU_H +#pragma once #include - -#endif diff --git a/lib/efm32/common/cmu_common.c b/lib/efm32/common/cmu_common.c index c1472ed6..8a577516 100644 --- a/lib/efm32/common/cmu_common.c +++ b/lib/efm32/common/cmu_common.c @@ -1,3 +1,6 @@ +/** @addtogroup cmu_file CMU peripheral API + * @ingroup peripheral_apis + */ /* * This file is part of the libopencm3 project. * @@ -20,6 +23,8 @@ #include #include +/**@{*/ + /** * Enable CMU registers lock. */ @@ -270,3 +275,5 @@ void cmu_clock_setup_in_hfxo_out_48mhz(void) /* wait till HFXO not selected */ while (cmu_get_hfclk_source() != HFXO); } + +/**@}*/ \ No newline at end of file diff --git a/lib/efm32/hg/cmu.c b/lib/efm32/hg/cmu.c index d5f3b4ce..3d678eeb 100644 --- a/lib/efm32/hg/cmu.c +++ b/lib/efm32/hg/cmu.c @@ -1,3 +1,6 @@ +/** @addtogroup cmu_file CMU peripheral API + * @ingroup peripheral_apis + */ /* * This file is part of the libopencm3 project. * @@ -20,6 +23,8 @@ #include +/**@{*/ + /** * Enable CMU registers lock. */ @@ -305,3 +310,5 @@ void cmu_wait_for_usbclk_selected(enum cmu_osc osc) return; } } + +/**@}*/ \ No newline at end of file