diff options
author | Karl Palsson <karlp@tweak.net.au> | 2019-06-22 03:53:54 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2019-06-22 04:38:20 +0300 |
commit | 9bc432474b1ceca6b130564da75879539c513694 (patch) | |
tree | 3ac1c9fe81a425c77a61b56520b0b3ddc56585ec /include | |
parent | 6d74262bf4820c47e062d3b4aa7391b5c985e69c (diff) |
doc: efm32: include gpio_common
gpio_common was built, but wasn't picked up by any documentation.
Use the peripheral_apis style from stm32, but try out the #pragma once
style. Downside is you don't get warnings if you include an sub layer
.h file. Upsides are
* no ifdef/endif blocks
* no /**@cond*/ /**@endcond*/ blocks
* that's enough win!
Diffstat (limited to 'include')
-rw-r--r-- | include/libopencm3/efm32/common/gpio_common.h | 10 | ||||
-rw-r--r-- | include/libopencm3/efm32/common/gpio_common_hglg.h | 17 | ||||
-rw-r--r-- | include/libopencm3/efm32/ezr32wg/gpio.h | 13 | ||||
-rw-r--r-- | include/libopencm3/efm32/hg/gpio.h | 13 | ||||
-rw-r--r-- | include/libopencm3/efm32/lg/gpio.h | 13 | ||||
-rw-r--r-- | include/libopencm3/efm32/wg/gpio.h | 13 |
6 files changed, 48 insertions, 31 deletions
diff --git a/include/libopencm3/efm32/common/gpio_common.h b/include/libopencm3/efm32/common/gpio_common.h index d8bce510..5099b997 100644 --- a/include/libopencm3/efm32/common/gpio_common.h +++ b/include/libopencm3/efm32/common/gpio_common.h @@ -1,3 +1,5 @@ +/** @addtogroup gpio_defines + */ /* * This file is part of the libopencm3 project. * @@ -17,12 +19,13 @@ * along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LIBOPENCM3_EFM32_GPIO_H -#define LIBOPENCM3_EFM32_GPIO_H +#pragma once #include <libopencm3/efm32/memorymap.h> #include <libopencm3/cm3/common.h> +/**@{*/ + #define GPIO_P(i) (GPIO_BASE + (0x24 * (i))) #define GPIO_PA GPIO_P(0) #define GPIO_PB GPIO_P(1) @@ -326,5 +329,4 @@ void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios); END_DECLS -#endif - +/**@}*/
\ No newline at end of file diff --git a/include/libopencm3/efm32/common/gpio_common_hglg.h b/include/libopencm3/efm32/common/gpio_common_hglg.h index 7e141117..55744902 100644 --- a/include/libopencm3/efm32/common/gpio_common_hglg.h +++ b/include/libopencm3/efm32/common/gpio_common_hglg.h @@ -1,3 +1,5 @@ +/** @addtogroup gpio_defines + */ /* * This file is part of the libopencm3 project. * @@ -17,15 +19,13 @@ * along with this library. If not, see <http://www.gnu.org/licenses/>. */ -/** @cond */ -#if defined(LIBOPENCM3_GPIO_H) -/** @endcond */ -#ifndef LIBOPENCM3_EFM32_GPIO_COMMON_HGLG_H -#define LIBOPENCM3_EFM32_GPIO_COMMON_HGLG_H +#pragma once #include <libopencm3/efm32/memorymap.h> #include <libopencm3/cm3/common.h> +/**@{*/ + #define GPIO_P(i) (GPIO_BASE + (0x24 * (i))) #define GPIO_PA GPIO_P(0) #define GPIO_PB GPIO_P(1) @@ -329,9 +329,4 @@ void gpio_port_config_lock(uint32_t gpio_port, uint16_t gpios); END_DECLS -#endif -/** @cond */ -#else -#warning "gpio_common_hglg.h should not be included explicitly, only via gpio.h" -#endif -/** @endcond */ +/**@}*/
\ No newline at end of file diff --git a/include/libopencm3/efm32/ezr32wg/gpio.h b/include/libopencm3/efm32/ezr32wg/gpio.h index 21cc6630..8332c851 100644 --- a/include/libopencm3/efm32/ezr32wg/gpio.h +++ b/include/libopencm3/efm32/ezr32wg/gpio.h @@ -1,3 +1,11 @@ +/** @defgroup gpio_defines GPIO Defines + * + * @brief <b>Defined Constants and Types for the EZR32WG GPIO module</b> + * + * @ingroup EZR32WG_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 <http://www.gnu.org/licenses/>. */ -#ifndef LIBOPENCM3_EFM32_EZR32WG_GPIO_H -#define LIBOPENCM3_EFM32_EZR32WG_GPIO_H +#pragma once #include <libopencm3/efm32/common/gpio_common.h> - -#endif diff --git a/include/libopencm3/efm32/hg/gpio.h b/include/libopencm3/efm32/hg/gpio.h index 5218af66..5be1565e 100644 --- a/include/libopencm3/efm32/hg/gpio.h +++ b/include/libopencm3/efm32/hg/gpio.h @@ -1,3 +1,11 @@ +/** @defgroup gpio_defines GPIO Defines + * + * @brief <b>Defined Constants and Types for the EFM32HG GPIO module</b> + * + * @ingroup EFM32HG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -15,9 +23,6 @@ * along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LIBOPENCM3_GPIO_H -#define LIBOPENCM3_GPIO_H +#pragma once #include <libopencm3/efm32/common/gpio_common_hglg.h> - -#endif diff --git a/include/libopencm3/efm32/lg/gpio.h b/include/libopencm3/efm32/lg/gpio.h index 71bd54f6..f0684bac 100644 --- a/include/libopencm3/efm32/lg/gpio.h +++ b/include/libopencm3/efm32/lg/gpio.h @@ -1,3 +1,11 @@ +/** @defgroup gpio_defines GPIO Defines + * + * @brief <b>Defined Constants and Types for the EFM32LG GPIO module</b> + * + * @ingroup EFM32LG_defines + * + * LGPL License Terms @ref lgpl_license + */ /* * This file is part of the libopencm3 project. * @@ -15,9 +23,6 @@ * along with this library. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LIBOPENCM3_GPIO_H -#define LIBOPENCM3_GPIO_H +#pragma once #include <libopencm3/efm32/common/gpio_common.h> - -#endif diff --git a/include/libopencm3/efm32/wg/gpio.h b/include/libopencm3/efm32/wg/gpio.h index 6bd8eb9b..7dafd830 100644 --- a/include/libopencm3/efm32/wg/gpio.h +++ b/include/libopencm3/efm32/wg/gpio.h @@ -1,3 +1,11 @@ +/** @defgroup gpio_defines GPIO Defines + * + * @brief <b>Defined Constants and Types for the EFM32WG GPIO module</b> + * + * @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 <http://www.gnu.org/licenses/>. */ -#ifndef LIBOPENCM3_EFM32_WG_GPIO_H -#define LIBOPENCM3_EFM32_WG_GPIO_H +#pragma once #include <libopencm3/efm32/common/gpio_common.h> - -#endif |